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

Need to Total Rows in Details Section

Status
Not open for further replies.

kc27

Technical User
Sep 10, 2008
171
US
My Crystal Reports 9 report returns results that look like this:

31909 (group header - rows below are the details section grouped by the number 31909)
07/25/2012 31909 8/19-SR-GO 08/19/2012 533211
07/25/2012 31909 8/19-SR-GO 08/19/2012 533212
07/25/2012 31909 8/19-SR-GO 08/19/2012 533213
07/25/2012 31909 8/19-SR-GO 08/19/2012 533214
07/25/2012 31909 8/19-SR-GO 08/19/2012 533215
07/25/2012 31909 8/19-SR-GO 08/19/2012 533216

What I want to do is get a some of the rows in the details section, and have the grouped section display in this fashion:

07/25/2012 31909 8/19-SR-GO 6 (the number of rows in the details section) 08/19/2012

It seems like I need to sum and suppress the details section to get the total number of rows per group, but the also include more details in the grouping header, vs the way it works right now where it only displays the grouped field value. Is there a way to accomplish this in Crystal?



 
kc27,

You should just need to drag all the fields you would like to see into the Group Header (or Footer). For the count, a summary of type "count" on your last field in the example -- for future posts, please include this information, as knowing the field names and sauch can make it much easier for Tek-Tip Member's to assist you.

Making some presumptions of data elements, your Group Level would then look like in bold, the line below is an example of the data you provided and how I have associated it:
[tt][Datefield]...[Customer Number].[mm/dd-xx-xx].[Datefield]...[Count of Invoice ID]
[07/25/2012]..[31909]...........[8/19-SR-GO]..[08/19/2012]..[533216][/tt]

Hope this helps! Cheers!


Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Mike

Thanks for the help. sorry about omitting the field names, I realize that having a frame of reference would be useful when reading the question. Your advice was very helpful, I'm just about where I need to be with this report.

The last column of six digit numbers in my report example are new image ID numbers. In my example, the group for ad #31909 has six new image numbers assigned to it.

I used the Running Total Fields option in the Field Explorer to total each record of "rop_image_asmt.img_id", resetting for each change of group of "ad_nbr"

The running total works fine, this is an example of the results I get when I add the running total field to the report

31909 (group header - rows below are the details section grouped by the number 31909)
Image Due date Ad No. Ad Descr Ad Run Date Image ID # New Image Count
07/25/2012 31909 8/19-SR-GO 08/19/2012 533211 1
07/25/2012 31909 8/19-SR-GO 08/19/2012 533212 2
07/25/2012 31909 8/19-SR-GO 08/19/2012 533213 3
07/25/2012 31909 8/19-SR-GO 08/19/2012 533214 4
07/25/2012 31909 8/19-SR-GO 08/19/2012 533215 5
07/25/2012 31909 8/19-SR-GO 08/19/2012 533216 6

When I move the New Image Count running total into the Group Header, the new images count drops down from 6 to 1. How do I maintain the running total of 6 when I move the running count up into the Group Header?
 
kc27,

I think the most simple solution to this is to move the entirety of your Group Header into the Group Footer.

The reason for this is that Variables/Running Totals evaluate (to my understanding) on a Left to Right, Top to Bottom order; therefore, in the group header, the value of your running total is 1 at this point in time (the reset is in the group header, "reset on change of ad_nbr"). By moving all your fields to the footer (and suppressing the details) you should have a report that appears the same as though the fields were in the Group Header, but will allow the added ability to show the value of your Running Total (as it will not reset to "1" until the next instance of the Group Header).

Please advise should this not be the case, or if I have misunderstood the issue. [smile]

Cheers!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Thanks Mike, moving it to the footer did the trick. I appreciate your sharing your expertise, it was a big help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top