Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: trouble with group summaries Post Reply Post New Topic
Author Message
scottaherbst
Newbie
Newbie
Avatar

Joined: 07 Feb 2007
Location: Afghanistan
Online Status: Offline
Posts: 1
Quote scottaherbst Replybullet Topic: trouble with group summaries
    Posted: 07 Feb 2007 at 3:46pm
I have a report that looks like this
 I've put my group summary in bold underline
 
 
 
Program Start Date                 Rating Date                        Rating Score
                                                      12/22/06                                       
5/22/06
4/17/05                                          12/22/06                              3
4/17/05                                          6/15/06                                5
4/17/05                                          4/17/05                                2
 
Here's what I've done so far.  I used a summary field and put it in the group heading to show the most recent rating date (by using the maximum function).  What I now want to do is include the rating score that corresponds to that date.  Any ideas?
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 07 Feb 2007 at 5:55pm
I have to deal with this all the time in my software apps, but I do it using a SQL statement. You might be able to work it into Crystal Reports somehow (I haven't thought about it in that way). Maybe make it a stored procedure and link it to your primary table? Here is a generic SQL statement using Max() that I use and should help get you started.

Select * From Table AS t0
WHERE t0.RatingDate =
(SELECT Max(t1.RatingDate)
FROM Table as t1
WHERE t0.ProgramId=t1.ProgramId)


If you want to stick with running totals, can you put the summary line at the end of the detail lines? If so, create a function which checks if the current date equals the Max date and if so, save the rating score in a variable. Then display that variable in the group footer.

Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.