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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Totals

Status
Not open for further replies.

Luvsql

Technical User
Apr 3, 2003
1,179
CA
I have the following report: Detail A contains data from Table 1 (Sales Data). Detail B contains data from Table 2 (Apply Information), where Table 1 left outer Join to Table 2 on Document Number. I have placed Document Number and Sales Amount from Table 1 into Detail A. I then place the Applied Document and the Applied Amount into Detail B from Table 2. I then suppressed blank on Detail B. It prints great, but in order to get a running total, it skips the data from detail B.

Ie this is what I would like in the end:

DA Inv 1000 $100.00 $100.00
DA INv 1001 $500.00 $600.00
DB Pay 30 ($50.00) $550.00
DA Inv 1002 $300.00 $850.00

Is this possible?
 
Detail_b fields are really part of the same record as detail_a, which is why the running total isn't working. Create a formula {@Total} which adds the two amounts:

{Table1.SalesAmount}+{Table2.AppliedAmount}

Then use {@Total} as the field to sum in the running total.

-LB
 
I created a formula, then creating a running total on that formula, placed it in Detail A, but it prints nulls for every value except records with existing data in the Detail B section.
 
Sorry--I forgot to account for the nulls. Try changing the formula to:

{Table1.SalesAmount} + (if isnull({Table2.AppliedAmount}) then 0 else {Table2.AppliedAmount})

-LB
 
Another means to eliminate NULLS is to select File->Report Options->Convert Null Values to Default.

If you need to use Null checking logic elsewhere in the report, don't do this, but most reports are fine without this.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top