Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crystal 2008 help suppressing text object in group Post Reply Post New Topic
Author Message
mason188
Newbie
Newbie


Joined: 23 Jan 2013
Location: United States
Online Status: Offline
Posts: 1
Quote mason188 Replybullet Topic: Crystal 2008 help suppressing text object in group
     Posted: 23 Jan 2013 at 3:26pm

Ok here is the situation, I have a crystal report for our invoices...there is a group header which groups on the invoice # and in the details are all the item #'s for that particular invoice.

I have a text object in the group header called "TRANS". I only want that text object to display in the group header when one of the item #'s starts with the letter S.

Anyways I created a formula called TheTrans as follows

if {StockCode} like '*S' then 1 else 0

and for the text object (TRANS) in the group header I put

if sum({@TheTrans}) = 0 then true;

Everything works fine when printing 1 invoice, however often times we do batch printing and if we print multiple invoices, then the text object is either always suppressed or never suppressed.

I know I need to reset the "sum" somehow, and I have tried shared variables and everything I think of but it's just not working. Please help, thanks.

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 24 Jan 2013 at 3:58am
couple of things that I would check.
1. if {StockCode} like '*S' then 1 else 0 is looking if the record ends with 'S', your post states begins with. If it is begins with 'S' I would alter it to
if {StockCode} StartsWith 'S' then 1 else 0
Now sum this at the group level
Use that as your suppression formula on the gh text field
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