• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 336
  • Last Modified:

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?
0
JamesJMcDonnell
Asked:
JamesJMcDonnell
  • 5
  • 5
1 Solution
 
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
 
Ido MilletProfessor 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
 
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now