|
I have a crosstab in Crystal Reports XI with a display string that displays a count for each time the condition is met:
Basically I have a summary column amountspent that I need to compare to avblcredit, and count every order where amountspent (the summary) exceeds avblcredit for each group, customer. I then have to display the total amount of orders for that customer where available credit is exceeded.
After much struggle due to the fact that I cannot use calculated members in Crystal Xi. I created a second duplicate summary for item exditures and edited the display string of the second summary to compare itself to avbl credit then count:
global numbervar count;
if currentvalue > avblcredit
then count := count + 1;
count;
The count then increments everywhere it finds the current value (sum of items) > available credit.
This works correctly if the crosstab prints fully on the page, however if the crosstab extends to the next page the count resets back to 0.
So basically as an example page 1 looks as follows:
customer 1
orders avblcredit amountspent count itema itemb itemc
ord1 4000 6000 1 2000 3000 1000
ord2 3734 5001 2 1000 2000 2001
ord3 4123 5000 3 4000 1000 0
ord4 2321 5000 4 5000 0 0
ord5 4000 5003 5 1200 3800 3
ord6 4000 6000 6 1000 2000 3000
page 2 with customer 1 group continued:
orders avblcredit amountspent count itema itemb itemc
ord7 4000 6000 1 2000 3000 1000
ord8 3734 5001 2 1000 2000 2001
ord9 4123 5000 3 4000 1000 0
ord10 2321 5000 4 5000 0 0
My question is how can I get my count from resetting on each new page?
Thanks
|