jehanzebn
Programmer
- May 28, 2001
- 244
Afternoon all,
I have a report with Crosstab which calculates number of orders against number of days. The same report shows two types of percentages (1: Normal and 2: Cumulative). The problem I am having is with Cumulative percentage being reset on the next page.
Report Footer:
[Crosstab]
Days - Jobs - Percentage - Cumulative percentage
To get the cumulative percentage I used a formula under Display String of the Normal Percentage field.
Then I created another formula reset which I placed on Report Header,
The report runs fine until the next page, the cumulative record gets reset and starts over again.
For example
Page 1
Cumulative percentage
20%
30%
45%
60%
80%
98%
Page 2
Cumulative percentage
0.1%
2.0%
2.1%
Initially I thought it was because of the reset I setup on Report Header, which then I took off however it did not made any difference to the cumulative percentage.
All the rest (Days,Jobs,Percentages) are correct only the cumulative which gets reset on the next page.
Any ideas?
Regards
Jehanzeb
Crystal Reports 2008
Visual Studio 2008
Informix Database
I have a report with Crosstab which calculates number of orders against number of days. The same report shows two types of percentages (1: Normal and 2: Cumulative). The problem I am having is with Cumulative percentage being reset on the next page.
Report Footer:
[Crosstab]
Days - Jobs - Percentage - Cumulative percentage
To get the cumulative percentage I used a formula under Display String of the Normal Percentage field.
Code:
Whileprintingrecords;
Numbervar x:=Currentfieldvalue;
Numbervar c:={@TotalJobs-CancelledJobs};
Numbervar v:=((x/c)*100);
Numbervar gTot:=gTot+v;
if gTot > 100 then "100.00%"
else
totext(gTot,2)+"%"
Then I created another formula reset which I placed on Report Header,
Code:
Whileprintingrecords;
Global Numbervar gTot:=0;
The report runs fine until the next page, the cumulative record gets reset and starts over again.
For example
Page 1
Cumulative percentage
20%
30%
45%
60%
80%
98%
Page 2
Cumulative percentage
0.1%
2.0%
2.1%
Initially I thought it was because of the reset I setup on Report Header, which then I took off however it did not made any difference to the cumulative percentage.
All the rest (Days,Jobs,Percentages) are correct only the cumulative which gets reset on the next page.
Any ideas?
Regards
Jehanzeb
Crystal Reports 2008
Visual Studio 2008
Informix Database