Subtotals using Custom code SSRS 2008

  • Hello,

    I am having a problem which started after switching to 2008 Reporting Services. We have a custom subtotal code snippet we use to calculate the subtotal for each group. For instance, a group may have several items under it, the subtotal will calculate the amounts of these items for the group.

    The way we accomplished it initially was to define a global "sum_value" variable, and "SumUp" function. The SumUp function was called within each item(detail group in a table) and then we would render the sum_value in the appropriate textbox (outside of the table). We would check the Group we are looking at to ensure that ONLY the values for that same group are added, else, we reset the sum_value to 0.

    It worked fine in Reporting Services 2005, but in 2008, the totaling seems to be ONE group behind....it displays the value for the previous group. Anybody have any ideas on how to fix or accomplish this type of totaling? The results textbox is OUTSIDE the table which is why we were using the global variable.

    Thank you very much in advance!

    UPDATE: To fix, we moved away from the custom code approach and just used the SUM aggregate at the Group Level. Sometimes, the easiest solution is right in front of you;-)

  • Hi, how did you use a global variable . can u paste the code snippet here

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply