URGENT Report Help

  • Thread starter Krzysztof via AccessMonster.com
  • Start date
K

Krzysztof via AccessMonster.com

Hello,

I have an urgent report that needs to de done, and I am having trouble
getting the correct results. i will try top explain the best i can.

Main report - sorted by 3 diferent criteria.
lowest level sort - here are my fields

date | num | currency | etc...

example

sorted field SM123456
date | num | curr
10/1 5 23201
10/1 6 29885

SM654321
10/1 4 61651
10/5 6 12345

The problem is the report needs to be shrunk, and the cur field summed, but
the report cannot do this because my date fields are different.
What i need: is if the date fields are the same, sum([curr])
if they are not, display line by line, and then sum (which that part is easy)

can i have both sum and group by data on the same report?

please help, much TIA

~K
 
P

Pat Hartman\(MVP\)

You can do this in the query if you can sum the num field or eliminate it.

Select fld1, datefield, Sum(num) as NumSum, Sum(curr) as currSum
From YourTable
Group by fld1, datefield;
 
K

Krzysztof via AccessMonster.com

Thank you for you response, if you could clarify the Sum(curr) as currSum, i
would much appreciate it. Is this a function? TIA
~K
You can do this in the query if you can sum the num field or eliminate it.

Select fld1, datefield, Sum(num) as NumSum, Sum(curr) as currSum
From YourTable
Group by fld1, datefield;
[quoted text clipped - 29 lines]
 
K

Krzysztof via AccessMonster.com

If there is anyone else out there that can help:

basically i need to do the following:

if all dates are the same, sum the currency field
if not, display each individual line item

can this even be done?
Thank you for you response, if you could clarify the Sum(curr) as currSum, i
would much appreciate it. Is this a function? TIA
~K
You can do this in the query if you can sum the num field or eliminate it.
[quoted text clipped - 7 lines]
 
P

Pat Hartman\(MVP\)

As I mentioned, the problem is the other field in the query. If it has
different values, it cannot be summed away. You have to remove it from the
query.

The easiest way to build a totals query is to select the columns you want
and then press the sigma button. This adds "group by" to each selected
column. Change "group by" to "sum" for the field you want to sum and
remember what I said about the other fields.

Krzysztof via AccessMonster.com said:
If there is anyone else out there that can help:

basically i need to do the following:

if all dates are the same, sum the currency field
if not, display each individual line item

can this even be done?
Thank you for you response, if you could clarify the Sum(curr) as currSum,
i
would much appreciate it. Is this a function? TIA
~K
You can do this in the query if you can sum the num field or eliminate
it.
[quoted text clipped - 7 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top