Link to home
Start Free TrialLog in
Avatar of JamesJMcDonnell
JamesJMcDonnellFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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?
Avatar of bdreed35
bdreed35
Flag of United States of America image

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?
ASKER CERTIFIED SOLUTION
Avatar of Ido Millet
Ido Millet
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JamesJMcDonnell

ASKER

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.

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

It's in GF1
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.
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
What is the number you get?

What should be some of the numbers you get (in different Group Footers)?
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
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
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.