Subreports: Parameter Value Dropdown Shows Sum And Count Fields But Not The Actual Data Fields.

Jan 28, 2008


I have just started using SQL Server reporting services and am stuck with creating subreports.

I have a added a sub report to the main report. When I right click on the sub report, go to properties -> Parameters, and click on the dropdown for Parameter Value, I see all Sum and Count fields but not the data fields.

For example, In the dropdownlist for the Parameter value, I see Sum(Fields!TASK_ID.Value, "AppTest"), Count(Fields!TASK_NAME.Value, "CammpTest") but not Fields!TASK_NAME.Value, Fields!TASK_ID.Value which are the fields retrieved from the dataset assigned to the subreport.

When I manually change the parameter value to Fields!TASK_ID.Value, and try to preview the report, I get Error: Subreport could not be shown. I have no idea what the underlying issue is but am guessing that it's because the field - Fields!TASK_ID.Value is not in the dropdown but am trying to link the main report and sub report with this field.

Am I missing something here? Any help is appreciated.

Thanks,
Sirisha

View 3 Replies


ADVERTISEMENT

ASP Only Shows Fields Which Contain Numeric Data

Jan 4, 2004

Hi

I'm using an SQL server database to run a website with ASP.

A new page I'm making will only display the contents on fields containing numeric data and it won't display text.

Other pages work fine. Does anyone have any ideas as to why this is happening - I've never seen in before.

Dave

http://pink-football.com/gossip.asp

View 2 Replies View Related

Separate Dropdown List Selectedvalue Into Two Fields

Aug 1, 2006

i have two columns in a "release" table that i concatenate on my aspx page into one value for my dropdown list.  for example, my database columns might look likeMajor: 3 | 3 | 4 | 4 | 5Minor: 1 | 2 | 1 | 2 | 1and my drop down list text like3.1 | 3.2 | 4.1 | 4.2 | 5.1my question comes when trying to take the drop down list's selected value and splitting it back into two fields so that i can use it for another query.  how can i split my "major" and "minor" version numbers back up so that i can run a query similar to:SELECT * FROM [Version] WHERE (([Major] = @Major) AND ([Minor] = @Minor))but only having the one parameter of: <asp:ControlParameter ControlID="ddlVersion" Name="Version" PropertyName="Text" Type="String" /> where the selected value has a string of "<major>.<minor>" (where the numbers are separated by a period)?

View 6 Replies View Related

Update Fields With Data From Other Fields In Same Row

Jun 30, 2000

Pardon me if this question is too elementary. I am trying to create a trigger that will cause certain datafields to be updated with values from other data fields in the same row when a certain column, created specifically to fire the trigger, is updated. The purpose of this is to reduce data entry by field personnel.I think I have the create trigger statement correct, but I'm a little confused on the update statement.

In a nutshell, how can I write something like:
UPDATE "TABLENAME"
SET DATAFIELD1 = DATAFIELD2
WHERE RECORDNUMBER = (THE SAME RECORD NUMBER)

I do know that I have to ensure that sp_dboption Recursive Triggers value is set to false, thanks.

View 2 Replies View Related

Count For 2 Fields

Jul 30, 2014

I have a table named pop. This table has 2 fields, field codes with articles and other field with details of those articles. I intend to make a count to items that have more than 1 detail. In addition to this result is possible result for example:

Detailarticles
64
535
4111
3523
22207

the first line says I have 4 articles with 6 details.

View 16 Replies View Related

How Do You SUM The Fields Retrieved By COUNT?

Mar 15, 2004

I am trying to do this in MS Access actually but it is an SQL question.

This query:

SELECT LoanNo, COUNT(LoanNo) AS 'Count'
FROM DedupTest031504
GROUP BY LoanNo
HAVING COUNT(LoanNo) > 1;


returns:
LoanNo Count
46690128 2
46861821 2
47762138 3
47762154 3
48257239 2
48257663 2
48257719 2
48258143 2
48258167 2

which is correct but how do you SUM the COUNT field? In other words, I want the total number of duplicate records in the table. Is there another way alltogether?

I tried:

SELECT LoanNo, SUM(COUNT(LoanNo))
FROM DedupTest031504
GROUP BY LoanNo
HAVING COUNT(LoanNo) > 1;

but I get a "CANNOT HAVE AGGREGATE FUNCTION IN 'SUM(COUNT(LoanNo))' error.

Thanks.

ddave

View 12 Replies View Related

Using COUNT To Add Fields In A Report

Apr 21, 2004

If I am totaling fields by groups of rows and I do so for every group do I need to use a stored procedure or cursor for this? I don't have a lot of experience with these areas but will give it a go based on what I find out.

Let me try to provide an example.

BranchNo OrderNo ErrorCode1 ErrorCode2 ErrorCode3
478 111 0 1 1
478 112 0 0 0
478 113 1 0 0
610 119 0 0 0
610 120 1 0 0

I am trying to total the "error code" fields for each Branch. Of course, some don't have any, some have multiple errors. If a stored procedure is the only way, it will be a problem as our company's DBA has not given me permissions to run SPROCs. Is there a way to do this in a query?

I have been trying to figure out a subquery for this and it is not working.

ddave

View 14 Replies View Related

Getting Count With Multiple Fields

Sep 6, 2005

Hi all,I'm running into a road block, and I know I've done this before. I'mgetting fields from two tables, and I need to do a count of similaritems with it showing some extra info.Here's my fields:Log.LogId - IntLog.LogDispatcherID - IntOfficer.OfficerID - IntOfficer.OfficerFirstName - VarcharOfficer.OfficerLastName - VarcharI can get the info I need without a count with this:select a.LogID,a.LogDispatcherID,b.OfficerFirstname + ' ' + b.OfficerLastname as OfficerNamefrom[Log] a, Officer bwhere a.LogAssigned1 = b.OfficerIDBut when I try to add a count and group-by it errors out:select Count(a.LogID) as LogCount,a.LogDispatcherID,b.OfficerFirstname + ' ' + b.OfficerLastname as OfficerNamefrom[Log] a, Officer bwhere a.LogAssigned1 = b.OfficerIDGroup By a.LogIDI've done this before, but this isn't working. It's giving the error"it is not contained in either an aggregate function or the GROUP BYclause" for each field other then LogID.How can I do this? I want output similar to this:LogCountLogDispatchIDOfficerName334Tom Jones422John Smith.... EtcThanks for any suggestions or ideas...Sam Alex

View 2 Replies View Related

Creating A Table In SQL Server With Fields From Other Tables And Some Fields User Defined

Feb 20, 2008

How can I create a Table whose one field will be 'tableid INT IDENTITY(1,1)' and other fields will be the fields from the table "ashu".
can this be possible in SQL Server without explicitly writing the"ashu" table's fields name.

View 8 Replies View Related

Public Overridable ReadOnly Default Property Fields() As ADODB.Fields

Jan 26, 2008

sir

I have got this error message to establish connction with recordset vb .net, Can you please rectify this

Too many arguments to 'Public Overridable ReadOnly Default Property Fields() As ADODB.Fields'

my code like this


rs = New ADODB.Recordset

rs.Open("Select * from UserLogin where userid='" & txtUserName.Text & "'", gstrDB, DB.CursorTypeEnum.adOpenStatic)


If txtUserName.Text = rs.Fields.Append(userid) Then


MsgBox("OK", MsgBoxStyle.OKOnly, "Confirmation")

End If


thanks

View 1 Replies View Related

Update Fields With Searched First Date Record Fields

Jul 23, 2005

Hello !I'm trying to update one table field with another table searched firstdate record.getting some problem.If anyone have experience similar thing or have any idea about it,please guide.Sample case is given below.Thanks in adv.T.S.Negi--Sample caseDROP TABLE TEST1DROP TABLE TEST2CREATE TABLE TEST1(CUST_CD VARCHAR(10),BOOKING_DATE DATETIME,BOOKPHONE_NO VARCHAR(10))CREATE TABLE TEST2(CUST_CD VARCHAR(10),ENTRY_DATE DATETIME,FIRSTPHONE_NO VARCHAR(10))DELETE FROM TEST1INSERT INTO TEST1 VALUES('C1',GETDATE()+5,'11111111')INSERT INTO TEST1 VALUES('C1',GETDATE()+10,'22222222')INSERT INTO TEST1 VALUES('C1',GETDATE()+15,'44444444')INSERT INTO TEST1 VALUES('C1',GETDATE()+16,'33333333')DELETE FROM TEST2INSERT INTO TEST2 VALUES('C1',GETDATE(),'')INSERT INTO TEST2 VALUES('C1',GETDATE()+2,'')INSERT INTO TEST2 VALUES('C1',GETDATE()+11,'')INSERT INTO TEST2 VALUES('C1',GETDATE()+12,'')--SELECT * FROM TEST1--SELECT * FROM TEST2/*Sample dataTEST1CUST_CD BOOKING_DATE BOOKPHONE_NOC12005-04-08 21:46:47.78011111111C12005-04-13 21:46:47.78022222222C12005-04-18 21:46:47.78044444444C12005-04-19 21:46:47.78033333333TEST2CUST_CD ENTRY_DATE FIRSTPHONE_NOC12005-04-03 21:46:47.800C12005-04-05 21:46:47.800C12005-04-14 21:46:47.800C12005-04-15 21:46:47.800DESIRED RESULTCUST_CD ENTRY_DATE FIRSTPHONE_NOC12005-04-03 21:46:47.80011111111C12005-04-05 21:46:47.80011111111C12005-04-14 21:46:47.80044444444C12005-04-15 21:46:47.80044444444*/

View 3 Replies View Related

Transact SQL :: Get One Row From Multiple Based On Fields And Also Get Sum Of Decimal Fields?

Jul 2, 2015

I am using MS SQL 2012.  I have a table that contains all the data that I need, but I need to summarize the data and also add up decimal fields while at it.  Then I need a total of those added decimal fields. My data is like this:

I have Providers, a unique ID that Providers will have multiples of, and then decimal fields. Here are my fields:

ID, provider_name, uniq_id, total_spent, total_earned

Here is sample data:

1, Harbor, A07B8, 500.00, 1200.00
2, Harbor, A07B8, 400.00, 800.00
3, Harbor, B01C8, 600.00, 700.00
4, Harbor, B01C8, 300.00, 1100,00
5, LifeLine, L01D8, 700.00, 1300.00
6, LifeLine, L01D8, 200.00, 800.00

I need the results to be just 3 lines:

Harbor, A07B8, 900.00, 2000.00
Harbor, B01C8, 900.00, 1800.00
LifeLine, L01D8, 900.00, 2100.00

But then I would need the totals for the Provider, so:

Harbor, 1800.00, 3800.00

View 3 Replies View Related

Column Count Percentage Of Not Null Fields

Jul 27, 2006

Hello folks,

I am stuck at a problem, not sure on how to go about writing a query that will return as a percentage the number of fields in a row that are null.

For instance, a row from my table:
Row1 : field1 field2 field3

If field3 is empty or null, my query should return 67%.

So far I have gotten the number of fields:
select count(1) from information_schema.columns where table_name='myTable'

I could loop through the fields but I am sure there is a simpler way of doing it, I have seen something simpler in the past with some builtin SQL functions. I am using MS SQL 2005.

Thanks for your help
Mike

View 2 Replies View Related

SQL Server 2012 :: Max Count Grouped By All The Fields

Sep 15, 2015

Trying to get the max count grouped by all the fields. All the fields are the same, but trying to get the location for each physician that has the largest number of patients.

if the output for the sql below is:

101, 10, Jon, Smith, MD, Ortho, OR, 15
101, 10, Jon, Smith, MD Ortho, 1, 12
101, 10, Jon, Smith, MD, Ortho, 2, 10
24, 3, Mike, Jones, MD, Neuro, OR, 21
24, 3, Mike, Jones, MD, Neuro, 2, 43

I'd like to have the query rewritten so the results are as:

101, 10, Jon, Smith, MD, Ortho, OR, 15
24, 3, Mike, Jones, MD, Neuro, 2, 43

SELECT
a.attendingmdkey,e.[provider id],e.[first name],e.[last name],e.title,e.specialty,l.locationname,count(a.accountid) as Count
FROM accounts a
left outer join location l on l.locationid=a.locationid
left outer join providers e on e.[ProviderID]=a.attendingmdkey
where a.dischargedate>='2014-12-01' and a.dischargedate<'2015-01-01'
and a.divisioncode in ('1','2','$')

group by a.AttendingMdKey,e.[provider id],e.[first name],e.[last name],e.title,e.Specialty,l.locationname
order by a.AttendingMdKey

View 3 Replies View Related

Problem Selecting Count, Comparing 2 Fields In Same Table

Jul 20, 2005

I have the following table structure.group1 group2 group1_result group2_result'One' 'Two' 3 2'One' 'Two' 3 1'One' 'Two' 2 5'One' 'Two' 4 1'One' 'Two' 0 5I need to sum up the number of times 'One' is greater than 'Two', andvice-versa. For example, the result I would like to achieve is asfollows.group1 group2 group1_total group2_total'One' 'Two' 3 2I'm using the following SQL statement, but I get 5 rows returned,giving me a '1' or '0' for each row.select group1, group2,sum(CASE WHEN group1_result > group2_result THEN 1 ELSE 0 END),sum(CASE WHEN group2_result > group12_result THEN 1 ELSE 0 END)FROM table1GROUP BY group1, group2Any help would be greatly appreciated.

View 1 Replies View Related

Search Multipe Fields, Compounding Fields, Like, Contains...?

Jul 20, 2005

I would like to search a table for a phrase, or for a partial phrase,eg on table product - for name or description, or name + descprition.How does one say select * from product where name + description like%phrase%or contains phraseCurrently I can get where name, or where descriotion like %phrase%,eg, where name like krups, or where description like coffee makerBut if I search for where name like %krups coffee maker% i get noresults. krups is in the name field, coffee maker is in thedescription field.Thanks,-M

View 1 Replies View Related

Data Flow Task Reports Different Row Count Than Actual Rowcount

May 9, 2006

I have a data flow task that moves all the rows from 18 tables on a production server to a reporting services server. One table, which does not contain the most rows (about 650K rows) reports all the rows have been transferred. However, if I go in to the SQL Mgmt Studio and do a Select count(*) on the table, there are only 110k rows.

Has anyone else experienced this problem?



Thanks,

Nick Anzano

View 4 Replies View Related

SQL Server 2012 :: Query To Get Count Of All Fields Named LX Where X Is A Number

Jan 29, 2015

For example in a table with this fields "field1, L1,L3,L100" field2 the count is 3

it would be better to match a number into the like but i thinks it cannot be done in the like so i've to add another condition to ensure all the text after L is a number.

is this the best way to do it?

Select count(*) from Information_Schema.Columns Where Table_Name = @Table
AND column_name like 'L%' and ISNUMERIC(SUBSTRING(column_name,2, len(column_name)-1))=1

View 6 Replies View Related

Using Parameter Values In Subscription Fields?

Sep 6, 2007

Anyone know if it is possible to reference the parameter values stored for a given subscription, in the subscription fields (subject/comment)?

So instead of just @ReportName at @ExecutionTime it could be @ReportName at @ExecutionTime (@ReportParameter1)

I know I can do this in data driven subscriptions, but was wondering if it was possible without.

Thanks,

View 1 Replies View Related

Passing Fields As Parameter Of Stored Procedure

Jul 6, 2000

Does anyone know how to pass a list of fields into a stored procedure and then use those fields in a select statement. Here's what I'm trying to do.

I have a front end application that allows the user to pick the fields they want return as a record set. Currently, all this is being done in the application. But, I'd like SQL to do it, if it's possible.


I'd pass the following into a stored procedure.

Set @Fields = "First, Last, ID" -- This is done in the application

Exec usp_return @Fields

Obviously, the following fails stored procedure doesn't work ...

CREATE PROCEDURE @FIELDS varchar(255) AS

SELECT @FIELDS FROM MY_TABLE

~~~~~~~~~~~~~~~

Any ideas?

MAPMAN

View 1 Replies View Related

Parameter Fields Get Unselected On Reports Under My Subscriptions

Sep 11, 2007

Under My Subscriptions I have a report that runs daily. This report allows me to select certain items from a dropdown in parameter fields or select all. Some days the report fails and I get the follow error: The subscription contains parameter values that are not valid. When I click Edit to review, the parameter field is blank and my selections have been unselected. This report has several parameter fields but only only one or two of the parameter fields are blank, the others are ok.


View 4 Replies View Related

Reporting Services :: SSRS - Using Fields That Are Already A Parameter

Jun 15, 2015

Currently i am setting up a report. The data source comes from pre-defined custom datasets where i've pre-entered the parameters for both Month and Year.

I already have one table up and working, but now i need a new table below it with a % column for each month so it gives visibility for the trend in recent months. As the interactive parameters are already in place; when i try to create the table it comes through with the specific month that the parameters are set too, and change when the parameters are altered.Is there a way to ignore the parameters for this table; or get around it?

View 2 Replies View Related

Changing/Accessing RS Parameter Input Fields

Jan 21, 2008

Hi,

I have two input felds recieved date from and to fields. I would like to put one checkbox (not one for from field and one for to field) and when you tick the checkbox, I would like to disable both input fields indicating null values for both input fields.
Is it possible?? If yes, how to archieve that?

Thanks a lot in advance,

Leon

View 1 Replies View Related

Is There A Way To Select What Fields To Display On A Report From A Multi-value Parameter?

Feb 19, 2008

I am trying to figure out a way to toggle the visibility of attribute data based on a parameter. Specifically, I have a report that has many columns that an end-user may not want to see, depending on what they are using the report for. I know you can toggle visibilities on individual columns easily enough, however I want the user to be able to select which fields (at the attribute level) they want visible on the report up in the parameters, via a multi-value prompt.

Is this possible with reporting services 2005?

Thanks.

View 9 Replies View Related

Report Designer : No Fields Being Refreshed After Parameter Added...

Mar 27, 2008

I'm relatively new to Report Designer in VS 2005 and have been trying to get a parameterised report working.

I have an MDX query that works with the datasource I set up, but as soon as I try to add a parameter, the fields disappear from the dataset.

Here's the query:




Code Snippet
SELECT

NON EMPTY { [Measures].[Var Rc] }



ON COLUMNS,
NON EMPTY { ([Time].[Year - Quarter - Month - Date].[Date].ALLMEMBERS *



[Company Master].[Region].[Region].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME
ON ROWS
FROM

( SELECT ( Filter( [Company Master].[Region].[All].Children,



Instr( [Company Master].[Region].Currentmember.Properties( 'Member_Caption' ), @RegionParam ) > 0) )
ON COLUMNS FROM [Supplier Spend])
CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS



This is all a generated query apart from the filter. If I change the @RegionParam back to its old constant value (which was 'Europe') then the fields appear again. I've set up the Query Parameters to cope with @RegionParam and also put a Report Parameter in the Layout page that uses it.

I'm lost as to why the fields don't appear with the parameter in there...

Rob

View 2 Replies View Related

Using LIKE To Find Any Of Fields In One Table In Fields Of Another

Jul 31, 2013

I have a list of items in one table and a field (pageName) in another table that may contain one of the aforementioned items somewhere within that field. There is no fixed position within the field where the itemNo may be so I can't just use SUBSTRING(pageName,2,5) in(select itemNo from tblItem).

Logically, it's like I need to combine IN and LIKE: select pageName where pageName LIKE IN %select itemNo from tblitemNo%..LIKE can only handle one comparison string.

View 5 Replies View Related

How To Pass Master Reports (fields!OrderId) Value To A Subreport As A Parameter Value

May 11, 2008

How to pass master reports (fields!OrderId) value to a subreport as a parameter value.


if i right click the subreport control on the main report layout, i do see parameters tab, under that would like to pass the (fields!orderID).


Thanks for the info.


View 4 Replies View Related

Change/Add Report Fields To Display Based On The Parameter Selected

Dec 18, 2007



I have a report parameter named "Schools" which display a list of schools. For example, Alo elementary school, Balo middle school and Calo high school.

When "Alo elementary" is selected the report only display students from that school along with other assessments data fields. same goes for other schools too. But I want to display different data fields for "Calo high school" when it is selected. It is not currently possilbe becasue I am using the same template for all types of schools. There some fields only should be displayed for "Calo high school" but not for any other type of schools.

I can accomplish this by creating two separate report, one for "Calo high school" and the other for other schools. But I want to accomplish this just by creating one report. So when "Alo elementary school" is selected it displays report with certain fields and when "Calo high school" is selected then it displays same fields as "Alo elementary school" but as well as some other fields too in the report. Is this possible? Need help.

View 4 Replies View Related

Drillthrough In Calculated Fields Enable When Drillthrough Option Is Disable In Original Fields, Is This A BUG?

Jan 21, 2008

Hi people
My users are having troubles with link to default drillthrough report when reports are exported to excel (they REALLY don't like this behavior ), so I decided set all of them disabled in report model, this work fine, but calculated field in reports has this drillthrough link.


Let me show you the situation. Entity Product has an UnitaryCost field, I set the EnableDrillthrough Property in False so when I export a report with this field, no link is shown.

But if I create in the report a calculated field Round(UnitaryCost) this field has a Drillthrough Link

Is this the standard and expected behavior? or its simply a BUG?

Have I done something wrong in my model? and in this case, How I can correct this?

regards.
Julio Diaz.

View 1 Replies View Related

TSQL - Trim String Containing Both Data And Value Into 2 Separate Data Fields

Aug 20, 2007

Hi!
Need help with this one:
I have a column with a string composed by several data. After using REPLACE several times, I get something like the data below, which has (in most of cases) a value and a date.








378 9/05

388 9/05

4/05

1/06 606

1/06 646

76 5/05

100 1/05

118 8/05

129 8/05

9/05 342

05/3 123

1/07

4/06 164
The problem is that I need to get each value alone (to separate columns), in example:
Value Date
378 09/2005
388 09/2005
0 04/2005
...
606 01/2006

and so on...
In addittion you can see that sometimes the Value come first or alone, and sometimes the Date come first or alone.

I will appreciate any good ideas,
Thanks in advance,
Aldo.


View 3 Replies View Related

Getting Data Fields In Stored Procedures

Aug 18, 2004

Hello,

How can I get the name of the fields along with datatypes of a stored procedures.

Thanks in advance,
Uday.

View 1 Replies View Related

White Spaces In Data Fields

Jan 31, 2006

Hi,
Whenever I insert a record into my table it adds trailing white spaces up to the amount of char's that the field is set to allow.  Obviously I don't want it to do this.
Among other problems then when I get the data back out it has a ton of white spaces, which normally wouldn't be a problem.  i could just use the .Trim() function, but for some reason when I bind the data to a drop down list and use the .Trim() function it doesn't trim the white spaces.
Anyways any ideas on how to make it so the white spaces don't get put in in the first place??  Or any other thoughts on this??  Thanks!

View 3 Replies View Related

Adding Data From Fields To Get A Total

Apr 11, 2006

EX:  I have a table for products, and each product has a quantity.  How can I add up the QTY field in all the rows to find out the total QTY of all the products.Any help would be greatly appreciated.gkc

View 4 Replies View Related







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