Hello all...
Using Crystal Reports 10, I have a report with 3 groups. Every different value of the first group is printed on a different page. How can I set up a variable to display the total number of records matching each value of my first group?
For example, I can create a formula to calculate the total number of records like this:
[tt]
if group1Field = [red]1[/red] then
totalCount := totalCount + 1;[/tt]
Then, I can just create a formula that simply returns totalCount and be done with it. However, there's one major problem with the above approach: I don't want the nice little [red]1[/red] there, because that would give me the total count of just one value of the group, namely 1 (duh!). I want the formula to look more like this:
[tt]
if group1Field = [red]currentGroupValue[/red] then
totalCount := totalCount + 1;[/tt]
Then, in every page, I want to display totalCount. The question is: how can access the current value of the group (that is, the value of the group on which the page is based) so that the formula can work correctly ? If I'm going about it the wrong way, please let me know...
Thanks!
JC
_________________________________________________
To get the best response to a question, read faq222-2244.
Using Crystal Reports 10, I have a report with 3 groups. Every different value of the first group is printed on a different page. How can I set up a variable to display the total number of records matching each value of my first group?
For example, I can create a formula to calculate the total number of records like this:
[tt]
if group1Field = [red]1[/red] then
totalCount := totalCount + 1;[/tt]
Then, I can just create a formula that simply returns totalCount and be done with it. However, there's one major problem with the above approach: I don't want the nice little [red]1[/red] there, because that would give me the total count of just one value of the group, namely 1 (duh!). I want the formula to look more like this:
[tt]
if group1Field = [red]currentGroupValue[/red] then
totalCount := totalCount + 1;[/tt]
Then, in every page, I want to display totalCount. The question is: how can access the current value of the group (that is, the value of the group on which the page is based) so that the formula can work correctly ? If I'm going about it the wrong way, please let me know...
Thanks!
JC
_________________________________________________
To get the best response to a question, read faq222-2244.