Reputation: 21
how to reset crystal reports variable value to 0 again for different group, or if I can make a variable that work only on one group but different value for another group? thanks
Upvotes: 2
Views: 21787
Reputation: 11
check this it will be helpful
As we know, field “record number” from “special fields” in Crystal Report starts from 1 and increase one by one for each record until last page of the report. However, when we need a record number field that resets from 1 whenever the group field changes, we need to manually create it.To create the record number field, here are the steps:
Create a new “Running Total Field”
Give a name for the field, for example : rtf_recordNumber
Choose a field to summarize.
Set the “Type of summary” to “count”
On “Evaluate”, choose “For each record”
On “Reset”, choose “On change of group”.
Choose the “key” group name field that will reset the record number.
Click OK
Add the field to the report.
this instructions are from above link
Upvotes: 1
Reputation: 715
Create one shared variable for each group. At corresponding group header, reset the value of shared variable to zero. Below is what you can write in group header formula.
Shared numbervar num:=0;
I hope this helps.
Upvotes: 1
Reputation: 9091
I agree with the above answer but only small correction instead of group footer place the reset formula in group header.
Upvotes: 0