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

Header and details analysis

Status
Not open for further replies.

paddydog

Technical User
Jun 4, 2003
22
0
0
GB
I'm trying to write an aged debt report. I have two important tables: the INVOICE HEADER table and the TRANSACTION DETAILS table. The HEADER table contains the unallocated / unpaid amount of the invoice and DETAILS contains the sales analysis information. The is a many-to-one relationship between DETAILS and HEADER lines. What I am aiming to do is create a report that can show the first analysis code from the DETAILS lines for each header.

Problem: Although I can eliminate these from printing by using groups based on the invoice header, any summary / subtotals added accumulates all instances of the HEADER unallocated totals - as a result, the total per account number is wrong - it adds up all the occurances of the match of multiple analysis lines to one header, giving a bogus total.

Is there any way to eliminate this? Ideally, I would like to call up only one analysis record from DETAILS, e.g. the first on it comes across as this would be enough to base my report splits upon.

Thanks for any help...
 
I wonder if you could create a subreport for the transaction details and within the subreport group on invoice number. Then drag the detail fields into the subreport group header so that the first detail displays in that header, and suppress all sections except the group header. Then link the subreport to the main report by invoice number and place the subreport in the group header. I think this would prevent your amounts from duplicating and then you could use conventional summaries, but I haven't tested this out.

-LB
 
Consider posting table layouts, example data and expected output.

The description states:

"What I am aiming to do is create a report that can show the first analysis code from the DETAILS lines for each header."

If all you want is a code, why do you care about totals?

It sounds like you want the first row from the child table
to be summarized for each Parent, anyway the 3 formula theory should handle this:

A variable at the header details and footer to sum it up and display.

If this sounds right let us know and someone will flesh it out.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top