on 02-09-2008 12:34 AM
Hi,
I have taken the Subreport. In the main report two groups are there based on ID(first group), timestamp(second group), for my purpose, i have taken subreport in the second group (it returns one value), based on the timestamp sometimes, it gives two values for one id. i want sum of these two values for one Id, i have used shared variables in the subreport, i am getting value back from the crystal report, can you give me any solution for this?
Regards
Pavani
Hi Pavani,
As I understand from your post that you want to sum up the value if there are two or more values in the sub report and pass it to the main report?
For that use two formulas in the sub report declare a shared variable for example see below:-
1) Place this formula in the report header of the sub report.
(
whileprintingrecords;
shared numbervar total:=0;
)
2) Place this formula in a section where you have placed the database field which you want to add.
(
whileprintingrecords;
shared numbervar total:=total+;
)
3) And Insert a section below the subreport in the main report.
4) And place this formula in the section below the subreport;
(
whileprintingrecords;
shared numbervar total;
)
Please let us know if you have any further queries.
Regards,
Vinay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.