on 05-08-2013 2:17 PM
Please I need assistance on my table.
Table 1
a b
revenue 5
revenue 6
revenue 2
expense 4
expense 6
expense 3
in the above table 1 was able to group them
as
total revenue 13
total expense 13
where my problem lies is to subtract total revenue-total expense
what formula can i use in crystal report?
thank you in advance
Hi Abiodun,
Create this formula and place it on the Group Footer:
whileprintingrecords;
numbervar revenue;
numbervar expense;
if {database_field} = "Revenue" then
revenue := Sum({measure_field}, {Group_field}) //replace {measure field} with the column name that contains values and {Group_field} with the database field that is used in the Group Expert
else if {database_field} = "Expense" then
expense:= Sum({measure_field}, {Group_field})
Then, create this formula and place it on the Report Footer:
whileprintingrecords;
numbervar revenue;
numbervar expense;
revenue - expense;
Hope this helps!
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.