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!

Record counted twice?

Status
Not open for further replies.

maggi

Programmer
Nov 21, 2002
27
US
Hi,

My report uses two tables that have a left outer join. Lets call the tables table1 and table2. table2 basically stores the comments. table1 can have multiple comments associated with it in table2. I have a formula in my report that sums up a field in table1. Right now if table1 has 2 comments associated with it in table2 it sums that field twice and hence the formula displays wrong result. How should this be handled?

Thanks
 
Use a running total that evaluates on change of the table1 field.

-LB
 
Group by the account number in table 1. Suppress the details and use the group header or footer as if it were a detail line.

Running totals can be set to evaluate once per group.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Running doesn't seem to work. Let me try and explain a little more. I have a formula in my detail section that I summarize in my group header #2. My report looks something like this

ID-----tasks
1111-----2
2222----10 (5+5) here it counts this record twice as table 2 has 2 comments associated with ID 2222. It should display only 5.
 
Go to the field explorer and insert a running total where you choose {table.amt}, sum, evaluate on change of group {table.ID} (insert a group as Madawc suggested), reset never.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top