Summing a formula containing a running total in Crystal 10

67 views Asked by At

I have searched on other questions similar to this but none seem to be in the same situation.

I have a series of transactions in which I am using a running total named TranNumber which resets on the change of the account number. When I sort by descending transaction date this running total gives me the most recent transaction as 1.

I also have another formula which contains a list of transaction codes and their position on a workflow (done using a select case formula).

I have tried to sum the following formula as well as variations such as using variables and passing data into a sub report and back to 'trick' the software into not seeing it as a running total, still to no avail as I can then not sum a variable.

if {#TranNumber} = 1 then 
if {@ProcCode} startswith "1 - " then 1 else 0 

Ultimately I want a count of accounts in each position on the workflow to then put into a graphical form.

If anyone has tried to do this successfully or can suggest a way to only bring back the most recent transactions for each account to avoid having to use the above method it would be greatly appreciated :)

Thanks in Advance

1

There are 1 answers

0
K Emery On BEST ANSWER

Resolved this issue by using the formula above and assigning to a variable and placing a counter formula in the details which worked like the below

shared numbervar x;
If {#TranNumber} = 1 then
if {@ProcCode} startswith "1 - " then x := x + 1

I then placed this formula in the details and then simply output the variable in the report footer which gave me the number I was looking for.