Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Suppress Header Post Reply Post New Topic
Author Message
bobbabuoy
Newbie
Newbie


Joined: 10 Mar 2008
Location: United States
Online Status: Offline
Posts: 37
Quote bobbabuoy Replybullet Topic: Suppress Header
     Posted: 21 Mar 2008 at 4:41am
I have a report that is set up by groups, and each group is from one to several pages long.  I have a company header (sub-report) showing up at the top of the group (these reports are mailed to each "group" member).  I have each group starting on a new page.  Right now the company header is showing up on every page.  I only want it to show up on the first page of the group.  How can I do that?  I tried suppressing the subreport if duplicated but that didn't work.

Thanks...
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 21 Mar 2008 at 10:39am
You can add a conditional formula on the Suppress property of the subreport that looks at the previous value of the grouping field and only suppress the subreport when they are the same.
{table.field} = PreviousValue({table.field})

I cover advanced formatting techniques such at this in Chapter 8 of my book Crystal Reports Encyclopedia. You can find out more about my books at Amazon.com or reading the Crystal Reports eBooks online.

Edited by BrianBischof - 21 Mar 2008 at 3:06pm
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
bobbabuoy
Newbie
Newbie


Joined: 10 Mar 2008
Location: United States
Online Status: Offline
Posts: 37
Quote bobbabuoy Replybullet Posted: 24 Mar 2008 at 4:25am
I am working in CR 8 and I don't think the PreviousValue function exists there because I get an error message when I use this formula.  Here is my code:

if{Accounts.Account #} = PreviousValue({Accounts.Account #}) then
    true
else
    false


Any ideas?
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