Reputation: 415
how to declare variables in crystal report ? coz i want to sum the total in sub-report and the total in the main-report to get the GRAND TOTAL of the report..i got a screenshot for my report...
i want to sum that 1000
which is the TOTAL in sub-report and that 808
total in the main report..how to do that in crystal report ? tnx in advance :)
Upvotes: 0
Views: 4681
Reputation: 1645
You will need a formula in your sub-report that looks similar to the following:
shared numbervar a := sum({yourfield});
Place that somewhere on the canvas of your sub. Then another in your main report that looks like this:
shared numbervar a;
Upvotes: 1