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!

Calculation boo boo 1

Status
Not open for further replies.

chevyimpala

Programmer
Dec 19, 2003
37
US
Okay how do I explain this. First I have a report called currency. This report is a select query that takes the data from the table and displays it by currency type, account. At the bottom of each currency type, and account there is a subtotal row that sums up the numbers and gives me a dollar figure.

My second report is called performance. It is a group by query that takes the numbers in the table and displays them by currency type. and in the currency footer it gives me a total of all accounts no matter what account type.

Here is where my problem inlies. In the currency report for account (sys1)(eur) I get subtotal 12,950.36 / account (discr) (eur) I get subtotal 25,654.23. which adds up to 38,604.59. Now in the performance report I get a number of 15,966.80.

Now why is it that one report gives me the right number but the other using the same table data gives me something totally different. Is it because of the group by funtion and how can i get it to give me the right number.
 
chevyimpala,

You are correct the Group By is what is throwing you off.

Group By tell the system to group by unique values so if data repeats in your group by you will only be doing the calculation on the single occurrance.

My advice would be to set up the subtotal calculation in the performance report using the domain functions such as Dsum.

HTH,

Steve
 
thx,

But where would the sub total go. Since the report has detail, account, currency, page and report footers.
again thanks for the sugestion I will try it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top