Printing Previous Record in Crystal Reports if Null Encountered

1k views Asked by At

I have a report in which i have a formula (in crystal syntax) balance which is inserted in details section.formula is like:

WhilePrintingRecords;
Global CurrencyVar Balance;
 if {table.cr}>0 or {table.dr} > 0 then
Balance:= Balance+ {table.cr} - {table.dr};
Balance

I want the report to print previous record for balance if table.cr and table.dr is null.Any help ???

1

There are 1 answers

1
Siva On BEST ANSWER

Balance is the value that you are calculating locally...

To the extent I understand you need to use the previous value of {table.cr} and {table.dr}

if ISNull({table.cr}) and ISNULL({table.dr}) then
Balance:= Balance+ Previous({table.cr}) - Previous({table.dr});
Balance

Let me know if this is not your requirement