Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding running total fields together

Status
Not open for further replies.

reitter

IS-IT--Management
Sep 18, 2002
27
US
I'm using an SQL database with Crystal 9. My report has 3 groups:

GH1 = DOCTOR
GH2= SERVICE DATE (by month)
GH3= INPATIENT OR OUTPATIENT

GF3 = TOTAL # OF CHARGES FOR Inpatient or Outpatient per Month. I'm using a running total field to total.


In my GF1 (doctor) I've got a graph that shows:

each month and a line for inpatient charges and outpatient charges. This part is all working fine. My problem is my CEO wants to see a 3rd line on this graph showing the 'TOTAL' charges per month - adding both the inpatient and outpatient totals.

We are all stumped here in our office, any suggestions would be GREATLY APPRECIATED!!
 
You should be able to create a running total that ignores the inpatient/outpatient field altogether and just totals all amounts. If there are other possible statuses, then create a formula {@both}:

if {table.status} in ["inpatient","outpatient"] then {table.amt}

You can then use this formula as your field to summarize in a running total. Or, if you don't have duplicate records, you can insert a sum on this for your main report display and for the chart, choose the "sum of @both}" as your last summary field.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top