Getting Access To The Data In Group 2 From Group1

Mar 30, 2007

I have a table with two groups.. like this

Table Header

Group 1 Header

Group 2 header

Detail

Group 2 footer

Group 1 footer

Table footer





I have a field value in group 2, I need to sum that field value in group 1.

Is there any way to do this? I thought you could go inwards in scope but not outwards?

View 1 Replies


ADVERTISEMENT

Data Access :: MS Access ADODB Connection To Stored Procedure - Cannot Retrieve Data

Sep 22, 2015

I'm trying to re-write my database to de-couple the interface (MS Access) from the SQL Backend.  As a result, I'm going to write a number of Stored Procedures to replace the MS Access code.  My first attempt worked on a small sample, however, trying to move this on to a real table hasn't worked (I've amended the SP and code to try and get it to work on 2 fields, rather than the full 20 plus).It works in SQL Management console (supply a Client ID, it returns all the client details), but does not return anything (recordset closed) when trying to access via VBA code.The Stored procedure is:-

USE [VMSProd]
GO
/****** Object: StoredProcedure [Clients].[vms_Get_Specified_Client] Script Date: 22/09/2015 16:29:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON

[code]....

View 4 Replies View Related

Data Access :: Management Studio To Access Data On Laptop?

Jun 30, 2015

I have a client who has SSMS installed on her laptop.  She is able to connect to the SQL server via SSMS in the office and query data on the server.

She needs to be out of site often and doesn't have internet access.  She asks if the data tables can be "backed up" or saved on her laptop, so she can look at them without worrying connecting to the server.  I am not sure if this can be achieved, as SSMS is built for accessing a server, not a desktop.  Myself never have this need.  If I really need it, I would go to Microsoft Access and create an ODBC connection to the datatables. But this client thinks that Microsoft Access is beneath her. 

View 4 Replies View Related

Data Access :: Data Import From Password Protected Access MDB

Jul 20, 2015

HowTo: Import data to MS SQL 2008 from password protected Access DB ?

View 2 Replies View Related

Can We Access Active Directory Group In A Report?

May 8, 2007

Is there a way that we can tell what active directory group the person belongs to that is running the report? I know that you can detect a user id, but I need to access the Active Directory Group that they belong to.

View 1 Replies View Related

Grant User Group Select Access To All Views In Database

Sep 24, 2013

I'm trying to grant a user group select access to all the views in a database. I already made a query which creates a result set whit the SQL Syntax I (displayed below) need but it seems to be impossible to get this result set executed after creation.

use [AdventureWorksDW2008R2]
SELECT
'GRANT SELECT ON [' + SCHEMA_NAME(Schema_id) + '].[' + name + '] TO [DOMAINGROUP]'
FROM sys.views;

View 5 Replies View Related

SQL Server Admin 2014 :: Group Policy User Denied Access

Sep 15, 2014

I have a user, who is trying log into the server, but everytime he gets this error saying something about the Group policy denies him access.

This user needs access and i'm trying to understand how to grant it to him.

I have been looking into how i can access the group policy editor, but the farthest i can get is the Local group policy editor. How do i make sure this specific user has access?

View 1 Replies View Related

Reporting Services :: Display Group Name Value Of Each Group In Column Header Outside The Group?

Sep 29, 2015

I have an SSRS 2012 table report with groups; each group is broken ie. one group for one page, and there are multiple groups in multiple pages.

'GroupName' column has multiple values - X,Y,Z,......

I need to group 'GroupName' with X,Y,Z,..... ie value X in page 1,value Y in page 2, value Z in page 3...

Now, I need to display another column (ABC) in this table report (outside the group column 'GroupName'); this outside column itself is another column header (not a group header) in the table (report) and it derives its name partly from the 'GroupName'  values:

Example:

Value X for GroupName in page 1 will mean, in page 1, column Name of ABC column must be ABC-X Value Y for GroupName in page 2 will mean, in page 2, column Name of ABC column must be ABC-Y Value Z for GroupName in page 3 will mean, in page 3, column Name of
ABC column must be ABC-Z

ie the column name of ABC (Clm ABC)  must be dynamic as per the GroupName values (X,Y,Z....)

Page1:

GroupName                 Clm ABC-X

X

Page2:

GroupName                 Clm ABC-Y

Y

Page3:

GroupName                 Clm ABC-Z

Z

I have been able to use First(ReportItems!GroupName.Value) in the Page Header to get GroupNames displayed in each page; I get X in page 1, Y in page 2, Z in page 3.....

However, when I use ReportItems (that refers to a group name) in the Report Body outside the group,

I get the following error:

Report item expressions can only refer to other report items within the same grouping scope or a containing grouping scope

I need to get the X, Y, Z ... in each page for the column ABC.

I have been able to use this - First(Fields!GroupName.Value); however, I get ABC-X, ABC-X, ABC-X in each of the pages for the ABC column, instead of ABC-X in page 1, ABC-Y in page 2, ABC-Z in page 3, ...

View 4 Replies View Related

SQL 2012 :: Give User / Domain Group Only View Access On Agent Role?

May 20, 2014

I have been struggling with this one for awhile now.I have a domain group which only must view the steps and history of all agent jobs.I have added the group to the sqlagentreadergroup.I have created a new role and denied this role,add job,update job,delete job etc execute permissions.But the user still can change ,delete or create a new job.

All the groups and users in th new role,does not have sysadmin rights.

we have sql 2012 enterprise version

What else can i try.I need this for audit purposes.

View 7 Replies View Related

Collapsing/Expanding Group Data In Table And Matrix Data Regions

May 30, 2007

Hi,



Is it possible to create Expand/Collapse functionality for the grouped data in Table and Matrix data regions? Essentially, the idea is for the user to be able to see the group/subgroup data if she wishes to by clicking on (+/-) symbols, as is usually the case in Tree View style data grid control in web apps. Any ideas how to accomplish the same in reporting services?



Thanks.

View 1 Replies View Related

Data Access :: Server Rejected The Connection - Access To Selected Database Has Been Denied

Jun 10, 2015

I have recently upgraded to SQL2014 on Win2012. The Access front end program works fine.

But, previously created Excel reports with built in MS Queries now fail with the above error for users with MS 2013.  The queries still work for users still using MS 2007. 

I also cannot create any new queries and get the same error message. If I log on as myself on the domain to another PC with 2007 installed it works fine, so I don't think it is anything to do with AD groups or permissions.

View 6 Replies View Related

Data Access :: Insert Rows To MS Access 2013 Without Listing Column Names

Nov 12, 2015

We need to insert data/rows from a SQL Server 2014 database into MS Access database.  The problem is, there are so many columns (100+) in the table and there are so many insert transactions of this kind (from different tables) that it is not very easy to write the code in VB.NET that lists all column names.

Both the Access and SQL Server tables have the same number of columns and the equivalent data types, so inserting is not really the problem.  It's just that is there a way to do an insert statement in T-SQL that does not name all the columns?

View 3 Replies View Related

Database Schemas And This Statement Has Attempted To Access Data Whose Access Is Restricted By The Assembly.

Jul 14, 2005

Hello.

View 5 Replies View Related

Multi-user Access Through A Data-access Layer/remoting Server

Oct 30, 2007

Hi guys,

I've been developing desktop client-server and web apps and have used Access and SQL Server Standard most of the time.
I'm looking into using SQL CE, and had a few questions that I can't seem to get a clear picture on:

- The documentation for CE says that it supports 256 simultaneous connections and offers the Isolation levels, Transactions, Locking, etc with a 4GB DB. But most people say that CE is strictly a single-user DB and should not be used as a DB Server.
Could CE be extended for use as a multi-user DB Server by creating a custom server such as a .NET Remoting Server hosted through a Windows Service (or any other custom host) on a machine whereby the CE DB would run in-process with this server on the machine which would then be accessed by multiple users from multiple machines??
Clients PCs -> Server PC hosting Remoting Service -> ADO.NET -> SQL CE

- and further more can we use Enterprise Services (Serviced Components) to connect to SQL CE and further extend this model to offer a pure high-quality DB Server?
Clients PCs -> Server PC hosting Remoting Service -> Enterprise Services -> ADO.NET -> SQL CE

Seems quite doable to me, but I may be wrong..please let me know either ways

Thanks,
CP

View 3 Replies View Related

Data Access :: Server Does Not Exist Or Access Denied

Apr 22, 2015

When i am trying to start our hospital software based on SQL server 2000, it shows Following Error.Search Condition is not valid, (DBNETLIB) Connection Open (connect()).  SQL server does not exist or excess denied. Due to Fetch data.I run our software in Windows 8.1, while it smothly runs in previous version of Windows XP and 7.

View 2 Replies View Related

Group Data By Weeks

Apr 22, 2008

hi, I am trying to group my data into weeks in a month.
I am using :
GROUP BY DateAdd(day, -1 * datepart(dw, convert(char(10),date1,23)),
convert(char(10),date1,23))

Which works ok, but my first day is the monday of each week.
Do you know how I can group by weeks,
where dates run from monday to sunday ?
So IN march I would have

week begin 3/3
week begin 10/3
week begin 17/3
week begin 24/3
week begin 31/3

But for the last day I only want to count the 31st, not the entire week.
Same goes for the beginning of the month,
eg for april, I want it to show as week beginning 31st march but I only count aprils data.

I hope that makes sense.

can you help ?

View 3 Replies View Related

How To Group Certain Rows And Get The Data.

Jul 2, 2007

Hi Folks,

I am stuck in forming a query.

My age wise employee count sample data (department wise) is as shown below.

Sample Data
-----------
Department [>55] [50-55] [<50] [<40] [<30]
---------- ----- ------- ----- ----- -----
Marketing 0 1 5 10 20
Op's Support 0 3 6 5 25
Op's Tech 0 0 0 3 10
Product Tech 0 0 2 4 12
Product Support 0 0 1 3 7

I would require the data (sum of employee count age wise) to be categorized at a boarder level. Each category comprising of one or more departments.

Operations [Op's Support + Op's Tech], Product [Product Tech + Product Support], Others [Marketing]
The expected result would be.

Category [>55] [50-55] [<50] [<40] [<30] [Total]
--------- ----- ------- ----- ----- ----- -------
Operations 0 3 6 8 35 52
Product 0 0 3 7 19 29
Others 0 1 5 10 20 36

Thanking you in anticipation.

Jabez.

View 4 Replies View Related

Group Data For Survey

Feb 5, 2008

hi,

i'm having following data:


create table survey
(
clientID int not null,
questionID int not null,
Answer int not null
)

insert into survey (clientID, questionID, Answer) values (1, 1, 1)
insert into survey (clientID, questionID, Answer) values (1, 1, 2)
insert into survey (clientID, questionID, Answer) values (1, 1, 4)
insert into survey (clientID, questionID, Answer) values (1, 1, 5)
insert into survey (clientID, questionID, Answer) values (2, 1, 1)
insert into survey (clientID, questionID, Answer) values (2, 1, 5)
insert into survey (clientID, questionID, Answer) values (2, 1, 8)
insert into survey (clientID, questionID, Answer) values (3, 1, 2)
insert into survey (clientID, questionID, Answer) values (3, 1, 4)
insert into survey (clientID, questionID, Answer) values (3, 1, 6)
insert into survey (clientID, questionID, Answer) values (3, 1, 9)
insert into survey (clientID, questionID, Answer) values (4, 1, 8)
insert into survey (clientID, questionID, Answer) values (5, 1, 1)
insert into survey (clientID, questionID, Answer) values (5, 1, 5)
insert into survey (clientID, questionID, Answer) values (5, 1, 9)


and i want to get it out like this:

ClientIDQ1_1Q1_2Q1_3Q1_4
----------------------------------------
1|1|2|4|5|
2|1|5|8|0|
3|2|4|6|9|
4|8|0|0|0|
5|1|5|9|0|

but i get the following output:

clientID Q1_1 Q1_2 Q1_3 Q1_4
----------- ----------- ----------- ----------- -----------
1 12 12 12 12
2 14 14 14 14
3 21 21 21 21
4 8 8 8 8
5 15 15 15 15

(5 row(s) affected)

with this code:



SELECT

distinct(clientID)
,Q1_1
,Q1_2
,Q1_3
,Q1_4


from
(select
distinct(clientID)
,sum(case when QuestionID = 1 and Answer in (1,2,3,4,5,6,7,8,9,10) then Answer else 0 end) as Q1_1
,sum(case when QuestionID = 1 and Answer in (1,2,3,4,5,6,7,8,9,10) then Answer else 0 end) as Q1_2
,sum(case when QuestionID = 1 and Answer in (1,2,3,4,5,6,7,8,9,10) then Answer else 0 end) as Q1_3
,sum(case when QuestionID = 1 and Answer in (1,2,3,4,5,6,7,8,9,10) then Answer else 0 end) as Q1_4


from
dbo.survey

group by clientid) as x

group by
x.clientID
,x.Q1_1
,x.Q1_2
,x.Q1_3
,x.Q1_4


order by clientID asc


what am i doing wrong? Thank you

View 9 Replies View Related

Group Data By Month

Feb 20, 2008

Hi,
how can i group data using specified date like for example per month.
here is my sample data.

fielddate | fieldnumber
january 1, 2007 | 1
january 5, 2007 | 2
February 2, 2007| 3
March 4, 2007 | 3
March 5, 2007 | 4

i want to sum all fieldnumber by month
result will be:

resultdate | resultnumber
january 2007 | 3
February 2007 | 3
March 2007 | 7

thnx for the help in advance.

View 3 Replies View Related

GROUP BY For Heirarchical Data

Mar 7, 2008

I have a table:

ID int, AreaID int, SaleAmount float, SaleDate smalldatetime

AreaID is an foreign key to a second table of heirarchical area data:

ID int, ParentId int, AreaName nvarchar.

The heirarchy varies in depth for different parts of the country - sometimes 3 levels deep, sometimes up to six.

My problem is this: how do a construct a sproc that will allow me to pass in any area id and then return one or more result sets with all the child data of that area id grouped (to allow a SUM() of the sales data and a MIN() of the dates) by EACH LEVEL of the heirarchy?

Sales data only exists in the bottom one or two levels.


I've tried looking at CTEs but can't seem to crack the problem. I got close with a WHILE loop, but that kept grouping the data at the same level.....

Thanks

John

Expected output from this data if, say, I passed in 1 (the National level)

'National', 47.81, 20-Feb-08
'Super Region A', 37.81, 21-Feb-08
'Region 1', 16.81, 21-Feb-08
'Region 2', 21.00, 22-Feb-08
'Sub Region 1', 8.81, 21-Feb-08
'Sub Region 2', 8.00, 22-Feb-08
'Sub Region 3', 7.70, 23-Feb-08
'Sub Region 4', 12.30, 22-Feb-08

and so on. Note that it doesn't have to be one table - each level could come back as a separate table (in fact, that might be helpful).

If I passed in 3 I'd get

'Region 1', 16.81, 21-Feb-08
'Sub Region 1', 8.81, 21-Feb-08
'Sub Region 2', 8.00, 22-Feb-08


(NB these results are just typed in, so forgive typos please, and the sums and min dates are not necissarily the same as from the sample
data below)

CREATE TABLE [dbo].[SalesData](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[AreaID] [int] NULL,
[SalesDate] [smalldatetime] NULL ,
[SalesAmount] [float] NULL
)


CREATE TABLE [dbo].[SalesAreas](
[ID] [int] IDENTITY(1,1) NOT NULL,
[ParentID] [int] NOT NULL ,
[Name] [nvarchar](64) NOT NULL
)

DECLARE @ID int
DECLARE @ID2 int
DECLARE @ID3 int

INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( 0, 'National') --1
SELECT @ID = @@IDENTITY
INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID, 'Super Region A')--2
SELECT @ID2 = @@IDENTITY

INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID2, 'Region 1') --3
SELECT @ID3 = @@IDENTITY
INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID3, 'Sub Region 1') --4
INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID3, 'Sub Region 2') --5

INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID2, 'Region 2') --6
SELECT @ID3 = @@IDENTITY
INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID3, 'Sub Region 3') --7
INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID3, 'Sub Region 4') --8

INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID, 'Super Region B')--9
SELECT @ID2 = @@IDENTITY

INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID2, 'Region 3') --10
SELECT @ID3 = @@IDENTITY
INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID3, 'Sub Region 5') --11
INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID3, 'Sub Region 6') --12
INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID3, 'Sub Region 7') --13

INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID2, 'Region 4') --14
SELECT @ID3 = @@IDENTITY
INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID3, 'Sub Region 8') --15
INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID3, 'Sub Region 9') --16
INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID3, 'Sub Region 10') --17
INSERT INTO SalesArea ([ParentID], [Name]) VALUES ( @ID3, 'Sub Region 11') --18



INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (4, DATEADD(d,-5, GETDATE()), 3.49)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (4, DATEADD(d,-6, GETDATE()), 2.81)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (5, DATEADD(d,-8, GETDATE()), 4.14)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (5, DATEADD(d,-9, GETDATE()), 1.89)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (5, DATEADD(d,-2, GETDATE()), 1.02)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (5, DATEADD(d,-3, GETDATE()), 3.13)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (7, DATEADD(d,-4, GETDATE()), 5.12)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (7, DATEADD(d,-4, GETDATE()), 6.17)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (7, DATEADD(d,-1, GETDATE()), 3.49)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (8, DATEADD(d,-4, GETDATE()), 4.29)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (8, DATEADD(d,-5, GETDATE()), 4.46)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (11, DATEADD(d,-6, GETDATE()), 3.33)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (11, DATEADD(d,-1, GETDATE()), 3.92)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (12, DATEADD(d,-7, GETDATE()), 5.89)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (13, DATEADD(d,-5, GETDATE()), 6.16)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (13, DATEADD(d,-3, GETDATE()), 3.34)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (15, DATEADD(d,-2, GETDATE()), 2.61)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (15, DATEADD(d,-3, GETDATE()), 5.12)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (16, DATEADD(d,-4, GETDATE()), 8.28)
INSERT INTO SalesData (AreaID, SalesDate, SalesAmount) VALUES (17, DATEADD(d,-5, GETDATE()), 2.44)

View 14 Replies View Related

USING 'CASE' TO GROUP DATA

Aug 22, 2006

Hi,Can anyone please help me with SQL syntax to create a second variablebased on the value of another (both numeric)?My effort is below but I get a syntax error.SELECTcharA,CASE charAWHEN < -199 THEN 2WHEN < 31 THEN 3WHEN < 82 THEN 4WHEN < 100 THEN 5WHEN < 105 THEN 6WHEN < 111 THEN 7WHEN < 143 THEN 8WHEN < 165 THEN 9WHEN < 233 THEN 10WHEN >= 233 THEN 11END AS Bin_charAFROM XServer: Msg 170, Level 15, State 1, Line 6Line 6: Incorrect syntax near '<'.

View 3 Replies View Related

Group Data By Weeks

Nov 2, 2006

I have data entered into a table using a datetime field. How can I group the data one week at a time and show mulitple weeks at a time?

View 14 Replies View Related

Using Group By For Text Data Type

May 22, 2006

Hi,I have a problem on an old app. This application is a Help Desk, any Computer related problem (Motherboard Burn Out, Software Crash, dll) on my company will be recorded using this Help Desk application.One month ago, some programmer found a bug in this program lead to many duplicate data on database. But too late, This program has entered production stage and used for more than 2 years. This bug only happen at some condition so I found out after 2 years running (when my boss reported there are some duplicate data on "helpDesk" table).The bug is solved but helpDesk table need some "cleaning" operation. Here is structure of that table :helpDesk Table- id (primary key, integer auto increment)- reported_by (varchar 200)- problem_title (varchar 200)- problem_description (text)- date_summited (datetime)well usualy if I want to find some duplicate data I wil type :SELECT     MAX(uid) AS uid, reported_by, problem_title, COUNT(uid) AS total_duplicateFROM         problemsGROUP BY problem_title, problem_description,uidHAVING      (COUNT(uid) > 1)But that query will not work because problem_description data type is "text" which not support "group by" statement.Any other Idea how to locate and cleaning up this duplicate data?thanks

View 2 Replies View Related

SQL Server 2014 :: How To Sum And Group Data

Jan 20, 2015

I want to group the following data attached by CUSTACCT, YEAR, PERIOD(month). As you can see in the attached example, I see duplicates for late fees and Exchange fees but none for FLIGHT_HRS. I want to see the data grouped by CUSTACCT by YEAR then by PERIOD for each of these: FLIGHTHRSSUM, LATEFEESUM, EXCHFEESUM without duplicates.

Is this possible?

This is my current SQL

SELECT dbo.VIEW_FLIGHT_HRS_TOT.YEAR AS FLTHRSYEAR, dbo.VIEW_FLIGHT_HRS_TOT.PERIOD AS FLTHRSPERIOD, dbo.VIEW_FLIGHT_HRS_TOT.FLIGHTHRSSUM,
dbo.VIEW_LATE_FEES_TOT.PERIOD AS LATEFEEPERIOD, dbo.VIEW_LATE_FEES_TOT.YEAR AS LATEFEEYEAR, dbo.VIEW_LATE_FEES_TOT.LATEFEESUM,

[Code] ....

View 9 Replies View Related

Selecting Distinct Data Using Group By

Aug 4, 2013

I have an action log table which records when a registrant record was viewed by a compnay employee. I have an sql query like this:

SELECT [ID]
,[RegistrantID]
,[EmployeeID]
,[UserID]
,[CompanyID]

[Code] ....

and data is like this:

IDRegistrantID EmployeeIDUserID CompanyID VacancyID Action ActionDate
17931629515163213NULL 42013-08-04 16:45:40.457
17921629215163213NULL 42013-08-04 16:45:33.003
1791NULL15163213NULL 32013-08-04 16:45:23.660
1790162959162893NULL 42013-08-04 16:45:09.543

[Code] ....

I want to select distinct views to a registrantid record ( the first ones) in one year. if a registrant was viewed 10 tmes a year then it will show only first time it was viewed. If it was viewed 10 times by an employeed in 2 years then it will show first time it was viewed. if it was viewed by 2 employees of same company 10 times in one year then it first time viewed record will be shown. if it was seen 10 times by 2 employees of two different companies in one year then first record of two companies will be shown. do i need to use group by or what ?

View 1 Replies View Related

Problem With Data Group Label

May 14, 2008

Can anyone tell me why the following returns a warning and does not work:




Code Snippet=IIf(InStr(Fields!Unit.Value,"-") > 0, Left(Fields!Unit.Value,InStr(Fields!Unit.Value,"-")-1),Fields!Unit.Value)





but the following does work as expected:




Code Snippet=IIf(InStr(Fields!Unit.Value,"-") > 0, Left(Fields!Unit.Value,3),Fields!Unit.Value)





The warning message that I get is:


[rsRuntimeErrorInExpression] The HeadingLabel expression for the chart €˜chart4€™ contains an error: Argument 'Length' must be greater or equal to zero.



What I am trying to do is only display the text preceding the "-" if it exists within the text otherwise just show the text as it is.

Thanks

View 3 Replies View Related

Displaying Group Headers Even When No Data?

Mar 20, 2008

I have a table where I need to display groupings of information. If there isn't any data for a given group, I still need to include that group and say "no applicable data" or somesuch underneath it. Any way of doing this?

View 1 Replies View Related

Transact SQL :: Difference Between Data With Group By

Jul 28, 2015

I have a SQL table like this

Events time endTime
Tram 2014-11-28 12:35:50.390 2014-11-28 12:43:19.120
Re-Entry 2014-11-28 12:43:19.120 2014-11-28 12:56:07.040
Tram 2014-11-28 12:56:07.040 2014-11-28 13:15:25.060 // EndDate Before dump
Dump 2014-11-28 13:15:25.060 2014-11-28 13:50:07.233
Tram 2014-11-28 13:50:07.233 2014-11-28 13:55:17.473
Load 2014-11-28 13:55:17.473 2014-11-28 14:06:55.063
Tram 2014-11-28 14:06:55.063 2014-11-28 14:37:12.100
Dump 2014-11-28 14:37:12.100 2014-11-28 14:37:12.100

I want to calculate the Difference between 2 dates like endtime before Dump -time..I am expecting output like this

ROW1   ROW2
 1    00:39:34
 2    23:12:55

You can find the details in SQL Fiddle here.

View 4 Replies View Related

Adding Nongrouped Data Into Group Row

Feb 6, 2006

This may sound a bit weird...but here it goes.  I have in my SSRS 2005 report one table.  In that table I have:

Header1

Groupp1

Footer1

Some of the fields in the Group look like this:

Company Number    Branch    FeeGoal

 The problem I have is FeeGoal.  It comes from a table that is simply joined to my main dataset (via the dataset's stored proc) on company number.   So I do not want this one summed.  I want it to be the value the user entered for that company only, not summed.  I have an ASP.NET input form where each of the companies has one FeeGoal input field.  I then update all company records in a temp table where they have a FeeGoal field....and update each FeeGoal Field for that company with the FeeGoal the user entered into my form.

IN the report group, I do not put sum for this field, I just put

=Fields!FeeGoal.Value

So that I end up with basically Top 1 of FeeGoal for the particular company in the group.  The problem I have now is how to sum up all FeeGoals without summing up of the same FeeGoal values for each company.  Remember, I just want to sum up all Top 1 values for FeeGoal in the Group.

How do I do this? 

 

Sample Data

CompanyName Field1 Field2  FeeGoal
ABC           100   2000    200000
ABC           100    232    200000
ABC           112      2    200000
DCE            23    223    300000
DCE           203    200    300000
DCE            24    229    300000
EER            22    344    400000
EER           220    111    400000

Picture that as my Dataset

Now in my Report, I have the followingfields in my Group, grouped by CustomerNumber(not shown)

Group1
CustomerName   Field1    Field2    FeeGoal

In my FeeGoal, I simply put =Fields!FeeGoal.Value, not =SUM(Fields!FeeGoal.Value) because I want to only sum Distinct, not 30000 + 30000 + 30000 for example..I only want to show 300000 for Company DCE

But in the Footer, I put the same Fields!FeeGoal.Value.  Of course that only returns the top result which is 20000 for company ABC.

If I then try =SUM(Fields!FeeGoal.Value), it's way over inflated because it's counting the FeeGoal multiple times per customer, I only want to sum up each common instance.

FeeGoal is a unique case, usually you let the grouping do it's work but I don't want to overinflate my total for FeeGoal in my Footer.

If there is some way to do =SUM(Top 1 FeeGoal) or SUM(Distinct FeeGoal) in SSRS 2005 VB syntax somehow in the expression builder, this is the only way to get this to be accurate unless someone else knows...

Here's a couple of screen shots.  You'll see the overinflated FeeGoal sum:

http://www.photopizzaz.biz/feegoal1.jpg
http://www.photopizzaz.biz/feegoal12.jpg

View 1 Replies View Related

Data Access :: Arithmetic Overflow Error Converting Expression To Data Type Int

Jul 24, 2015

When I execute the below stored procedure I get the error that "Arithmetic overflow error converting expression to data type int".

USE [FileSharing]
GO
/****** Object: StoredProcedure [dbo].[xlaAFSsp_reports] Script Date: 24.07.2015 17:04:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

[Code] .....

Msg 8115, Level 16, State 2, Procedure xlaAFSsp_reports, Line 25
Arithmetic overflow error converting expression to data type int.
The statement has been terminated.
(1 row(s) affected)

View 10 Replies View Related

I Am Accessing Data Using Data Access Pages In IIS 7 To SQL Server 2005 Authentication Is Failing

Feb 5, 2007

is there a step by step paper to get there? here is what i need to consider. I Iwill have many customers that will need their own set of records and access pages "branded for their company" each customer will have many clients. I am hosting this application on a windows 2003 server with SQL 2005 server enterprise.

I am using windows authentication, I have created a username in windows, then i added the windows user in SQL management studio in security, granted "DB Read" and "DB write" and again under the database security tab. still from the web authentication fails. i must be nissing a step or two?

I expect to set up a username for each database as i setup new customers.

View 1 Replies View Related

Having Trouble Following Tutorial - Working With Data In ASP.NET 2.0 :: Creating A Data Access Layer

Nov 1, 2006

HiI'm having problems following the tutorial on creating a data access layer -  http://www.asp.net/learn/dataaccess/tutorial01cs.aspx?tabid=63 - when I try to compile in Visual Studio 2005 I get namespace could not be found. I followed exactly the tutorial - I created a dataset and added this code in my aspx page.  <asp:GridView ID="GridView1" runat="server"             CssClass="DataWebControlStyle">               <HeaderStyle CssClass="HeaderStyle" />               <AlternatingRowStyle CssClass="AlternatingRowStyle" />In my C# file I added these lines...    using NorthwindTableAdapters; <<<<<this is the problem - where does this come from?   protected void Page_Load(object sender, EventArgs e)    {        ProductsTableAdapter productsAdapter = new         ProductsTableAdapter();        GridView1.DataSource = productsAdapter.GetProducts();        GridView1.DataBind();    }Thanks in advance

View 6 Replies View Related

Power Pivot :: External Access To Data Sets In The Data Catalog?

Apr 23, 2015

I'm currently working on a BI architecture for a customer, and consider to propose the Power BI data catalog as a data distribution layer. The customer will use Power BI, but also has other BI tools.

Are data sets in the data catalog available to other clients than Power Query alone? E.g. are there OData feed endpoints available? If not, what would be the best way to give other tools access to the data?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved