Hello Everyone!
I'm using Crystal 2008 and SQL Server 2005
I have 2 groups in the main report
My subreport is in the footer of the group # 2
I calculate the total documents in the subreport and pass it to the main report by using a shared variable.
shared numbervar BarDataCount:=0;
BarDataCount:=Count ({Table.BarData}, {@Proper Bardata});
Shared variable in Main Report
Formula #SharedBarDataCount
shared numbervar BarDataCount;
BarDataCount;
This is placed in one of the footer sections of Group #2 below the Subreport section.
I use this variable to get the totals for the Group 1 # and the Grand Total.
Formula :BardataBUnitCount
shared numbervar BunitBardataCount;
shared numbervar BarDataCount;
shared numbervar GrandBarDataCount;
BUnitBardataCount:=BUnitBardataCount+BarDataCount;
GrandBarDataCount:=GrandBarDataCount+BarDataCount;
BarDataCount:=0;
BunitBardataCount;
I'm reseting the BardataCount here and displaying the BUnitBardataCount value in the Group #1 Footer
I placed BUnitBardataCount reset formula in the Group #1 header
Reset formula
shared numbervar BunitBarDataCount:=0;
Everything works fine
The totals from subreport are coming fine to the main report
and adding up fine for the Group #1 and Grand Totals
Until the value of Group#1 spans into more than 1 page
I mean if there more Group#2's under the Group#1 and they span into the next page
Since the BunitBarDataCount is reseting on the Group#1 header
whatever it adds up in the first page is setting back to '0' and then it is adding the values in the next page and displaying that total.
basically if there are multiple pages i'm getting the totals of only the ones in the last page for that Group#1.
Please help ,I don't know how to handle this.
Hope it is clear
I'm using Crystal 2008 and SQL Server 2005
I have 2 groups in the main report
My subreport is in the footer of the group # 2
I calculate the total documents in the subreport and pass it to the main report by using a shared variable.
shared numbervar BarDataCount:=0;
BarDataCount:=Count ({Table.BarData}, {@Proper Bardata});
Shared variable in Main Report
Formula #SharedBarDataCount
shared numbervar BarDataCount;
BarDataCount;
This is placed in one of the footer sections of Group #2 below the Subreport section.
I use this variable to get the totals for the Group 1 # and the Grand Total.
Formula :BardataBUnitCount
shared numbervar BunitBardataCount;
shared numbervar BarDataCount;
shared numbervar GrandBarDataCount;
BUnitBardataCount:=BUnitBardataCount+BarDataCount;
GrandBarDataCount:=GrandBarDataCount+BarDataCount;
BarDataCount:=0;
BunitBardataCount;
I'm reseting the BardataCount here and displaying the BUnitBardataCount value in the Group #1 Footer
I placed BUnitBardataCount reset formula in the Group #1 header
Reset formula
shared numbervar BunitBarDataCount:=0;
Everything works fine
The totals from subreport are coming fine to the main report
and adding up fine for the Group #1 and Grand Totals
Until the value of Group#1 spans into more than 1 page
I mean if there more Group#2's under the Group#1 and they span into the next page
Since the BunitBarDataCount is reseting on the Group#1 header
whatever it adds up in the first page is setting back to '0' and then it is adding the values in the next page and displaying that total.
basically if there are multiple pages i'm getting the totals of only the ones in the last page for that Group#1.
Please help ,I don't know how to handle this.
Hope it is clear