Running Totals or a Formula

Ok, this seems so easy but I’m struggling here.

I need a total for only certain records, which is easy enough to do. My problem is I need to put that total in first group header. I can see my total in the report footer, but it always shows $0 in the header.

I’m using Crystal XI R2

Here’s what I have tried so far.
Formula:
whilereadingrecords;
global currencyvar BillableAmount;

if {Command.Billing Status}=“Billable” then
BillableAmount := BillableAmount + {Command.ReimbursementAmount} else
BillableAmount := BillableAmount

Running total with the following condition.
{Command.Billing Status}=“Billable”

Any help would be greatly appreciated.


khorn (BOB member since 2008-04-18)

Hi,

I don’t think you can get running total value in header. Running total is calculated during ‘Pass2’.

I used running total in Cross tab and got the value in header. Hope this helps.

:+1:


contactsivaa (BOB member since 2005-09-22)

Another solution to this is insert the report into iteself (in the group header) as a subreport. Link the subreport on the value that the groupheader is based on. Then use a shared variable to get the runningtotal out of the subreport into the main report. Then suppress the subreport (as long as shared variables now work between a main and suppressed subreport). If not, make the subreport really small…


ABILtd :uk: (BOB member since 2006-02-08)

ok, thanks. I will give the subreport route a try.


khorn (BOB member since 2008-04-18)