Showing posts with label records. Show all posts
Showing posts with label records. Show all posts

Monday, March 12, 2012

Report Service output suppressing duplicate info

Hello,
Here is the situation. I have a table with a fieldname called VAL. I
call a stored procedure to return 4 records from the table.
Ok, the 4 records's field name VAL all have the same value , "Horray".
I created a report with a table and only want to display the VAL column.
I was expecting to see 4 rows of 'Horray' but I only see one row. Is there
place in the Report Service to turn off suppressing duplicate values?
product is Sql Server Reporting Service 2000.
Thanks
SteveOn the table, select your val column textbox , right click for properties you
can see "Hide duplicate" so this does the things..
Amarnath
"steve kwon" wrote:
> Hello,
> Here is the situation. I have a table with a fieldname called VAL. I
> call a stored procedure to return 4 records from the table.
> Ok, the 4 records's field name VAL all have the same value , "Horray".
> I created a report with a table and only want to display the VAL column.
> I was expecting to see 4 rows of 'Horray' but I only see one row. Is there
> place in the Report Service to turn off suppressing duplicate values?
> product is Sql Server Reporting Service 2000.
> Thanks
> Steve
>
>|||hi steve
here's another solution
right click the text box, click properties, click on visibility tab. select
Expression radio button and click on the function button. enter this
expression there
=(Previous(Fields!PK_Field1.Value) = Fields!PK_Field1.Value)
replace PK_Field1 with the field name that determines the duplicate value
for you. repeat the same step for all the text boxes that where you want to
suppress the duplicates.
this way, if you had a report like this
field1val 1234 abcd
field1val 1234 xyz
field2val 3988 alsdk
you'll see this output:
field1val 1234 abcd
xyz
field2val 3988 alsdk
hope it helps
"steve kwon" wrote:
> Hello,
> Here is the situation. I have a table with a fieldname called VAL. I
> call a stored procedure to return 4 records from the table.
> Ok, the 4 records's field name VAL all have the same value , "Horray".
> I created a report with a table and only want to display the VAL column.
> I was expecting to see 4 rows of 'Horray' but I only see one row. Is there
> place in the Report Service to turn off suppressing duplicate values?
> product is Sql Server Reporting Service 2000.
> Thanks
> Steve
>
>

Monday, February 20, 2012

Report Record Count in Header Section

Do anyone know how to do a count on the number of records in a data set and
display the information in the header section of the report? I can easily
perform this operation in the data section using the Count() method against
the data set, but RS does not allow datasets/fields to be referenced in the
header section. By required design, this record count textbox is above a
page count textbox (which must also be in the header since it's a global
variable), so I can't cheat by moving the field to the data section - it must
live in the header. Any help would be appreciated.
The only alternatives that I can think of are:
-Somehow reference a textbox that is using the Count() method in the data
section, and display the same text in the header section. (I have no idea
how I would do this.)
-Determine the record count and page count in SQL to move both fields to the
data section. I didn't want to do this because if the report layout changes,
the page count might not be correct.You can achieve this by using scope. Get the count of records for the table
level as follows:
In the header section add an expression as follows:
=Count(<field>, "<table name>")
Regards,
SaraS|||Unfortunately, you can't use Count() or CountRows() in headers or footers.
"saras" wrote:
> You can achieve this by using scope. Get the count of records for the table
> level as follows:
> In the header section add an expression as follows:
> =Count(<field>, "<table name>")
> Regards,
> SaraS
>|||Have you tried to use Report!Items.whatever.Value?
These fields are used in headers and footers. If you manage to get this data
in data section you can copy it to header section by
Report!Items.fieldname.Value.
"Bryan" wrote:
> Do anyone know how to do a count on the number of records in a data set and
> display the information in the header section of the report? I can easily
> perform this operation in the data section using the Count() method against
> the data set, but RS does not allow datasets/fields to be referenced in the
> header section. By required design, this record count textbox is above a
> page count textbox (which must also be in the header since it's a global
> variable), so I can't cheat by moving the field to the data section - it must
> live in the header. Any help would be appreciated.
> The only alternatives that I can think of are:
> -Somehow reference a textbox that is using the Count() method in the data
> section, and display the same text in the header section. (I have no idea
> how I would do this.)
> -Determine the record count and page count in SQL to move both fields to the
> data section. I didn't want to do this because if the report layout changes,
> the page count might not be correct.
>