on 09-02-2008 4:13 PM
I've got a report where I need custom groupings based on a formula. Two fields need to be compared against one another. Based on the results groups need to be created. The results wll be 3 scenarios resulting in 3 different status possibilities:
Scenario 1 - If Field B >0 and Field A < Field B then Status ="Paritally Recevied"
Scenario 2 - If Field A =Field B then Status ="Recevied"
Scenario 3 - If Field B =0 then Status ="Not Recevied"
So the 3 groups would be Partially Received, Received, Not Received and all are based on running all report records through the formula before displaying them in those groups.
I have no idea of the correct syntax for this but have soem experince in the Crystal Reports formula deisgner. I also don't know how to add the correct formula to the group paramters,
Any help is appreciated.
The formula seemd to work for each record but it is not performing the analysis on all records and then sorting and grouping correclty. It does it record by record. I need all records analized and then grouped and sorted accordingly.
Thanks for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
whilereadingrecords;
If Field B >0 and Field A < Field B then "Paritally Recevied"
else If Field A =Field B then "Recevied"
else If Field B =0 then "Not Recevied"
else "Does not fit into other categories"
Use the above formula and you may want to check your criteria if you have a lot appearing in the last "Does not fit into other categories" group.....
Hi Dereck
How did you sorted this out.
Sunil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your help with this thred. The replies seemed to work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Derek,
You might need to include 'whilereadingrecords;' at the beginning to specify when the formula is to be evaluated. Groups are created during the whilereadingrecords phase, and may need to be added.
For example, create a new formula under the Field Explorer and enter the below syntax by replacing Field X with your database field. Then create a new group using your formula.
================================
whilereadingrecords;
If Field B >0 and Field A < Field B then "Paritally Recevied"
else If Field A =Field B then "Recevied"
else If Field B =0 then "Not Recevied"
================================
Regards,
Wallie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this formula
If Field B >0 and Field A < Field B then "Paritally Recevied"
else If Field A =Field B then "Recevied"
else If Field B =0 then "Not Recevied"
insert a group using this formula tha gives three groups like
Partially recevied
Recevied
Not Recevied
Regards,
Raghavendra
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 | |
10 | |
7 | |
6 | |
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.