on 01-27-2013 10:32 AM
I'm a Crystal Report Beginner
My datasource as following,
My design as following,
I want to create Formula Fields as following
To calculate Earning is edtype=01. As a result, Earning= 50.00
To calculate Deduction is dtype=02. As a result, Deduction= 8.00
To calculate Nett is Earning - Deduction. As a result, Nett= 48.00
How to create the Formula Fields as following
Please help me
Hi Sharul Nizam,
I think the 'edtype' and 'edamount' are the 2 fields that are involved in the calculation.
Both seem to be placed on the 'Details' section in the report design.
If that is the case, then you can do this by writing 3 formulas:
1. 1st formula - "Calculate E And D"- Place this in 'Details' section and suppress.
Whileprintingrecords;
numbervar earning;
numbervar deduction;
if {edtype}=01 then earning:= earning + {edamount}
elseif {edtype}=02 then deduction:= deduction + {edamount}
else 0;
2. 2nd formula- "Display Nett": Place this in Group Footer
Whileprintingrecords;
numbervar earning;
numbervar deduction;
earning-deduction;
3. 3rd formula- Reset E And D"- Place this in Group Header and suppress
Whileprintingrecords;
numbervar earning:= 0;
numbervar deduction:=0;
Please keep this forum thread updated with the results.
Thanks,
Prathamesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.