Hi,
I am using Crystal Report 13 with visual basic 2010. I am using the following formula to calculate the sum
@headerResetMetal (in header section)
Global NumberVar x;
Global NumberVar metalValue;
WhilePrintingRecords;
metalValue:=x;
x:=0;
metalValue
@sumOfMetal (in detail section)
Global numberVar x;
WhilePrintingRecords;
x:=x+CDbl({tmpValReport.MVALUE});
@footerSumMetal (in page footer)
NumberVar x;
NumberVar metalValue;
WhilePrintingRecords;
x:=x+metalValue;
The above formula sometime give the correct result but sometime while calculating the sum it take the first record of next page. For example
In Page 1 we have
200
450
500
Sum:: 1490 but it should be 1150
In page 2 we have
opening c/f: 1490
340
450
Total: 2280 but it should be 1940
I stuck here did not get any clue on net why this is happening. Could any one please help me on this ?