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

Running total showing good results for 2 groups but not the others

Status
Not open for further replies.

gyfu

Programmer
May 28, 2001
77
HK
I have a problem with running totals. Actually I have also tried using summary totals and it still produce the same result. Running out of ideas what to troubleshoot.

Group by ID No. of Items
where status=2
101 320
107 120
108 90
110 800

Above is the displayed report that I get. No. of Items is a running total of count on ID, evaluate on status=2, reset every group.

When I check the results on my SQL server, the 2 lines 101 and 107 have the same result, but the last two lines has the counting off. SQL shows, 99 for line 108 and 825 for line 110.

any ideas what else I could check for?

By the way, I have selected Distinct Count as well.

-- gyfu --
Crystal Ver 10
Microsoft SQL
 
What is your data source?
Do you have any Joins or selection criteria operating that could be affecting the results?
 
My datasource is Microsoft SQL server.

And I do have joins which is rather complex for me but I did manage to get to this point.

I have a right outer join enforce on both.

-- gyfu --
Crystal Ver 10
Microsoft SQL
 
My suspicions wouldbe that the joins are not working as you expect. But you can test the data content by creating a copy of your report and in the copy adding a selection rule of Status = 2. Modify the copy to give you a simple count of the records and see how that compares with your real report.
 
Thanks lupins,
I think I figured it out, I did almost exactly what you said just now and I got the link options working. You are right the joins are not working as I expect and it seems to work fine now.

Thanks for the inspiration.

-- gyfu --
Crystal Ver 10
Microsoft SQL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top