all groups > sql server reporting services > september 2005 >
You're in the

sql server reporting services

group:

Showing custom aggregates in Group Footers


Showing custom aggregates in Group Footers isaak
9/27/2005 10:19:06 AM
sql server reporting services: In my group footer I want to show a string that was built by concatenating
some data from individual records within a group. For example,

Group 1
10 AB
20 CD
30 EF
Group 1 Footer 60 for AB,CD,EF

I wrote a custom code function that builds a concatenated string and stores
the result in an instance variable. I call this function for each individual
row within the group. The function returns the "running" concatenated
string. This works as expected, and I can see the "running total" result in
each individual row. But when I try to display the same value in the Group's
Footer - it shows the "running total" from before the group was processed.
(see below) What am I doing wrong? If using custom code is not an option
here, is there another way of showing "aggregated" group information?

Group 1

10 AB AB
20 CD AB, CD
30 EF AB, CD, EF

Group 1 Footer 60 for


Group 2

10 XY XY
20 ZX XY, ZX
30 KL XY, ZX, KL

Group 2 Footer 60 for AB, CD, EF

Re: Showing custom aggregates in Group Footers Robert Bruckner [MSFT]
10/9/2005 4:09:38 PM
The group footer is processed after the data rows are read (and aggregates
are calculated), and before the expressions in the detail rows are
processed. Therefore, in order to achieve the behavior you are looking for,
you have to use two steps:
* in the table detail row, you have to call your custom function to add
items wrapped in an aggregate function. E.g.
=First(Code.AddItem(Fields!abc.Value))
* in the table group footer, just make the call to the custom function that
retrieves the result. E.g. =Code.ConcatenatedItems()

-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]

AddThis Social Bookmark Button