Summary field In Crystal Reports XI produces wrong result

I am developing a report which is grouped on a formula field @Route which is composed of two database fields (Origin and destination) separated by a space. I have inserted a summary field into the Group Footer which counts the database field PONumber (which exists in the detail section). However the summary field is coming out wrongly. It shows the same number for each @Route group. The Detail section in the report is suppressed. Any ideas of what I can try to fix this?
JamesJMcDonnellAsked:
Who is Participating?
 
Ido MilletConnect With a Mentor Professor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
I suspect your summary is a formula that looks like:  
Count({PONumber})
This would give you a Grant Total and hence would be the same anywhere you place it on the report.

You need to change it to:
Count({PONumber}, {@Route})
which would give you the Count by Route.

- Ido

0
 
bdreed35Commented:
If you unsuppress the details, are there defintely different numbers of records per Route?
Is your summary field using distinct count or another summary type rather than count?
0
 
JamesJMcDonnellAuthor Commented:
Hi bdreed35, my summary field did look like Count({PONumber}) but when I changed it to Count({PONumber}, {@Route}) I got the same results. There are different numbers of records per route and they appear when the suppression on the detail section is lifted.

0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
That comment (about the required syntaxt for the summary formula) was from me.
 In what section did you place the summary formula?  Are you sure it is in GF1 or GH1 (it should NOT be in RF1 or RH1)?

- Ido

0
 
JamesJMcDonnellAuthor Commented:
It's in GF1
0
 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
Copy & Paste to show us the @Route formula.

Copy & Paste to show us the summary formula.

Are you 100% sure you are grouping, at levcel 1,  on the @Route formula.
0
 
JamesJMcDonnellAuthor Commented:
Route formula:
{Transit Analysis PO Details.OriginName} + ' ' + {Transit Analysis PO Details.DestinationName}

summary formula:
Count({Transit Analysis PO Details.PONum}, {@Route})

The Group Name field is @Route and the summary formula is in GF1
0
 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
What is the number you get?

What should be some of the numbers you get (in different Group Footers)?
0
 
JamesJMcDonnellAuthor Commented:
The report is parameterised and for the widest range of values I get 5, 5, 5 for three different routes when I should get 3,1,1. The

For Month June 2006 I get 3,3,3 when I should get 1,1,1

For Month July 2006 I get 2 for one of the routes, which is correct
0
 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
Given that 5 matches the grand count of the 1st case, and 3 matches the grand count of the 2nd case, I suspect you didn't update the formula you are showing according to the instructions we gave.

You may have created a new formula according to the instructions, but you are still showing the old formula.

Cheers,
- Ido
0
 
JamesJMcDonnellAuthor Commented:
Actually I had used earlier version of the report (as the current version had a temporary error) which did not have the {@Route} bit in the summary formula.
When I tried later with the current version I discovered that it is working properly now and that I had used a certain other parameter and not realised that there would be fewer records (duh!) So thanks for your help Ido as the inclusion of {@Route} was what was needed.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.