on 10-21-2014 10:56 AM
Hi Jay,
What is there in @ifrequired ? This is a formula, can you past what you have in this formula ?
you can use previous() next() functions on direct fields.
Thanks,
Sastry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
numbervar req;
numbervar compare;
compare:={@Pf_Balance};
if {@Pf_Balance}<0 then
req:=req+{@Required}
else if {@Pf_Balance}>0 then
(
if req<compare then
req:=0
else if req>compare then
req:=req+{@Required}-{@Pf_Balance}
)
this is the the formula in the ifrequired field sir.
PF_Balance and required are both formula fields.
Hi sir Sastry.
Im trying to get the previous data of the ifrequired field.
every line has a designated date.
Example.
September 1 - 0.0
September 2 - 0.0
September 3 - 0.00
September 4 - 0.00
September 5 - 0.00
September 6 -2613.56
September 7 - 0.00
On september 7 i want to use the value of 2613.56(sept6) in a formula in the line. thats why i try to use the previous function but an error appears
Hi Jayvenson,
Please check on below points in your report:
1. Does your PF_Balance and required formulas return a summation value?
2. Check whether usage of WhilePrintingRecords as first line in your formula resolves the issue.
If you still get the error, may be you can share the report with saved data and renaming it as .txt instead of .rpt, so that someone can check for possible reason for the error you are getting.
Thanks,
Raghavendra
Hi,
The report isn't opening.
It says either file is corrupted or not valid .rpt file.
Did you rename the file as .txt after saving it as .rpt with data? or did you save it as .txt from Crystal Designer?
Please save the file with data as .rpt file first.
Then rename it as .txt.
Please share the file again.
Thanks,
Raghavendra
Hi,
Error is because you have used previous({@CashOnHand}) in yesterday formula and using yesterday formula in Required formula. Which in turn is being used in ifRequired formula.
Since you are again trying to fetch previous value of a field where previous is fetched, you are getting error. You may have to revisit your yesterday formula first and try to resolve the issue
Thanks,
Raghavendra
Hi sir Sastry.
Im trying to get the previous data of the ifrequired field.
every line has a designated date.
Example.
September 1 - 0.0
September 2 - 0.0
September 3 - 0.00
September 4 - 0.00
September 5 - 0.00
September 6 -2613.56
September 7 - 0.00
On september 7 i want to use the value of 2613.56(sept6) in a formula in the line. thats why i try to use the previous function but an error appears
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jay,
Please add the if statement
if not onfirstrecord then(
previous({@ifrequired});
)
else(
0;
);
The reason why it is throwing an error is due to the first record trying to grab a previous (non-existent) record.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
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.