Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Same field Different value in Header vs Footer Post Reply Post New Topic
Author Message
Eroslight
Newbie
Newbie


Joined: 01 Nov 2011
Online Status: Offline
Posts: 2
Quote Eroslight Replybullet Topic: Same field Different value in Header vs Footer
     Posted: 01 Nov 2011 at 5:23am
All,
I've been lurking around these forums a lot lately - greatly appreciate everything everybody has done. Thanks!

That said:

I have a crystal report that has a dynamic field (Runs.ProgramName) in the header and in the footer (also Runs.ProgramName).

I have had several instances now where the ProgramName displayed in the Header is different then in the Footer. The root cause is known:
For instance - a batch of goods has program name X for the first 2, then changes to Y for the other 18.

The report queries based off of batch number and some how populates the header ProgramName field with X, then pulls back individual data for each good in the batch, then populates the footer with Y ProgramName.

My Question is this:
How do I prioritize which field is populated when?
Is there a way around this? The problem is exacerbated by the fact that several other fields in the header are based off the programName in the header.

Edited by Eroslight - 01 Nov 2011 at 5:23am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 01 Nov 2011 at 10:49am
you could group by the program name, which will put all of one group together. One would think that would be the simplest solution.
 
Otherwise you would need to examine your data  to see what order it should be displayed int
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Nov 2011 at 4:42am
for clarity sake, if you are placing a field in the report header and report footer, all crystal does is display the value from the first row of data (header)and the last row of data (footer) in your total data set. If you change the sort order it will change what appears in because it changes what becomes the first and last rows of the data set.
As lockwelle suggests if you group by program name this will also change the sort order (sorting on groupname first) and will therefore impact first and last rows.
IP IP Logged
Eroslight
Newbie
Newbie


Joined: 01 Nov 2011
Online Status: Offline
Posts: 2
Quote Eroslight Replybullet Posted: 02 Nov 2011 at 5:04am
DBlank - thank you for that clarification. That helps out immensely!

Regards,
Eros
IP IP Logged
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