Subreport footer sum is wrong

Stimulsoft Reports.NET discussion
Post Reply
hfirst
Posts: 25
Joined: Mon Apr 20, 2015 2:11 pm

Subreport footer sum is wrong

Post by hfirst »

2017.2.4 - C# - SqlServer

I have a page with a data band and subreports in that databand. I have a few datasources with a single master data source and all others as children with relationships. The main databand is for the master data source. In my subreports, for each child datasource, I have a databand and a footer and the footer is suming the rows of the child detail band above it in the subreport. The subreports are pointing to the correct child data source, the relationship and the mainpage master data band.

It's not working. It's doing a cumulative sum across the whole report. Every subreport databand is correctly showing it's child records for each master record row. The 1st subreport footer is correctly summing the subreport databand rows above it. The next master record and then it's subreports are correctly showing the proper child rows linked to that master record. But the footer in the subreport is now including the prior details and the new details in it's calculation.

In the footer of the subreport, for the total fields, I have them set to the Sum, the DataBand above it, and column option down below.

Shouldn't I be able to sum within a subreport for just what's in the databand?

Example
Master Record 1
Sub Report 1 Databand Row 1 - 10
Sub Report 1 Databand Row 2 - 11
Sub Report 1 Footer Total - 21

Master Record 2
Sub Report 1 Databand Row 1 - 5
Sub Report 1 Databand Row 2 - 6
Sub Report 1 Footer Total - 32 (I am expecting 11)

Master Record 3
Sub Report 1 Databand Row 1 - 12
Sub Report 1 Databand Row 2 - 5
Sub Report 1 Footer Total - 49 (I am expecting 17)
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Subreport footer sum is wrong

Post by HighAley »

Hello.

We don't see your report template and could only guess what is wrong with it.
It's possible to create such report many different ways. There are huge different properties that could cause this issue.
What summing expression do you use?
So at least we need to see your report template with sample data.

Thank you.
Post Reply