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

Grouping / Sorting Issue

Status
Not open for further replies.

brxmas

Programmer
Feb 9, 2004
69
US
ODBC SQL 2000
Crystal 11.0

I have two groups:

1) ad #
2) insertion date

I need to show all ad # in ascending order by date 05/02/2005, 05/03/2005, etc. In the example below
ad # 36688 has 5 ads, but I only want to see one line (sum).
The problem I'm having is it groups by ad #. If I group by
insertion date as my first grouping it shows all ads for
36688 by date (05/02/2005, 05/03/2005)

So, in my report I would see these ads with sum data
36688 05/02/2005
43355 05/02/2005

57235 05/02/2005
17312 05/02/2005

25130 05/08/2005
17381 05/08/2005

If anyone can help, I would appreciate it.

Thanks in advance for your help....
 
So is the data in your post the desired output, or the existing output? And please post whichever one you left out.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Existing output:
12786 10047300 05/08/2004 251.12
21503 10090600 05/08/2004 114.50
25130 10057803 05/09/2004 2327.05
32105 10057803 05/16/2004 2001.20
36688 10047300 05/02/2004 529.70
42902 30160200 05/10/2004 94.68
4335 10311100 05/02/2004 443.96

What I would like to see:
ad # acct # date $$
36688 10047300 05/02/2004 529.70
4335 10311100 05/02/2004 443.96

12786 10047300 05/08/2004 251.12
21503 10090600 05/08/2004 114.50

As you can see, the data is sorting by ad #. If
I group by insertion date as my first grouping, then
it shows all dates for that ad #. And, I only want
to see one line (summary). If an ad runs 9 times with
different dates in that period, I only want to see the
first date, and the sum for all 9 ads.

Thanks for your help.

BC

 
I responded to your other post with a suggestion to use topN/group sort. Should work.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top