Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Supress if a value Post Reply Post New Topic
Author Message
lentil
Newbie
Newbie
Avatar

Joined: 28 Feb 2010
Location: Australia
Online Status: Offline
Posts: 18
Quote lentil Replybullet Topic: Supress if a value
     Posted: 15 Mar 2010 at 6:55pm
Hello all,

I am just writing some rpeorts and cant work out how to supress a particular value?

My report looks like this:

Staff Name (group)

Induction Checklist                        Yes
Drivers Licence                               Yes   Expiry Date: 25/12/10
EEO forms                                       No
EOD                                                 No
Position decription                          Yes

What I want to be able to do is supress the fields that are a yes value as well as supress licences that are still current so that they dont show in the report.  and If a Group has no entries supress that as well!

Any tips greatly apreciated!

Regards

Leith

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 16 Mar 2010 at 3:33am

for the yes/no field, it is probably a boolean, so a suppression formula like:

{table.yesNoField}
 
place it in the FormatField/General/Suppress(x-1).  If it is the text Yes/No that is stored in the database then it would be:
 
{table.yesNoField} = "Yes"
 
Same would go for the date:
{table.expireDate}> Today
 
 
suppressing a group is harder.  By no entries, do you mean literally no records, or all records have been suppressed...it is difficult to see if all entries have been suppressed before they are read.  You could use a subreport for this, but that would basically mean that all your data is read twice and is a performance hit. 
 
If you got the data from a stored procedure, you could just delete all records that are Yes or not expired and you would display just the values that remain, making the report simpler.
 
HTH
IP IP Logged
lentil
Newbie
Newbie
Avatar

Joined: 28 Feb 2010
Location: Australia
Online Status: Offline
Posts: 18
Quote lentil Replybullet Posted: 16 Mar 2010 at 9:38am
Thank you !!

I think at this stage I can get away without the group supress!

the other stuff has worked a treat!

ClapClap

Regards

Leith


Clap
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Mar 2010 at 10:14am
You can possibly do group suppression.
What exactly do you mean by "a Group has no entries"?
IP IP Logged
lentil
Newbie
Newbie
Avatar

Joined: 28 Feb 2010
Location: Australia
Online Status: Offline
Posts: 18
Quote lentil Replybullet Posted: 16 Mar 2010 at 10:22am
The Group is null I guess? 

there are three possible answers Yes No and null (not entered)!  I have ungrouped I am getting away with it so I dont think I will worry about it!

Ill come back in a month and re ask the question Big%20smile.

I do have one more question relating to the supression -

is it possible to change the layout if they are supressed? I.e

Going from

Induction list
Drivers Licence (supressed)
EEO (supressed)
EOD(Supressed)
Position profile

to
Induction list
Position profile

just to tidy up the report layout after the supression has taken place?

Regards

Leith




IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Mar 2010 at 10:30am
You can suppres regarding NULLS in case you need to in the future.
Thre are some tricks on suppress groups too.
 
as for tidying up I think you mean you are getting blank spaces on teh suppressed portions,
You can handle that in the section expert.
select the section and then chec k the 'Suppress Blank Section' box as True.
IP IP Logged
lentil
Newbie
Newbie
Avatar

Joined: 28 Feb 2010
Location: Australia
Online Status: Offline
Posts: 18
Quote lentil Replybullet Posted: 16 Mar 2010 at 10:34am
thanks again!!

Am I right in thinking that supressing will only supress the whole detail section if it is blank? Does this work if I have multiple entries within the detail section? Or do I have to insert multiple sections for each entry?

Sorry for all the Newb questions just trying to get my head around this powerful bit of gear!

Regards

Leith

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Mar 2010 at 10:53am

Not sure I understand the question. Can you clarify.

IP IP Logged
lentil
Newbie
Newbie
Avatar

Joined: 28 Feb 2010
Location: Australia
Online Status: Offline
Posts: 18
Quote lentil Replybullet Posted: 16 Mar 2010 at 10:57am
Its ok I worked it out

I had all the items in one details section!  so I added new details sections for each suppressible item!

and then ticked supress blank section in the section expert!

thanks again for the help!

Regards

Leith



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