Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: suppressing detail lines (XI) Post Reply Post New Topic
Author Message
Eany
Newbie
Newbie
Avatar

Joined: 21 Nov 2007
Location: United Kingdom
Online Status: Offline
Posts: 17
Quote Eany Replybullet Topic: suppressing detail lines (XI)
     Posted: 31 Jan 2008 at 3:42am
I have XI.
My report has a detail line, which contains a description (text) and an inserted box.
I wish to suppress the line if this description is blank.
I have gone to Section Expert and coded against
Suppress ( No drilldown)

if isnull({Description}) then
    true
else if {Description} = ' ' then
    true
else
    false

However, I still get lots of rows, with only boxes in them.

And there is nothing in Format Box, to suppress the box depending on other fields,

Can anyone help me please ?
Eany
IP IP Logged
Savan
Senior Member
Senior Member
Avatar

Joined: 14 Dec 2007
Location: India
Online Status: Offline
Posts: 162
Quote Savan Replybullet Posted: 31 Jan 2008 at 4:09am

check the supress (no drill) option and  in the formula editor please put the below formula

 ltrim(rtrim({Description})) = ""
 
here no else is required.


Edited by Savan - 31 Jan 2008 at 4:13am
Thanks
Savan
IP IP Logged
Eany
Newbie
Newbie
Avatar

Joined: 21 Nov 2007
Location: United Kingdom
Online Status: Offline
Posts: 17
Quote Eany Replybullet Posted: 31 Jan 2008 at 4:23am
Thanks Savan
Do you mean in the Suppress (Drop Down) ?
I changed the code in there to :-
If ltrim(rtrim({Description})) = "" then
    true
else
    false

But still get the blank line with the box !!
Eany
IP IP Logged
Savan
Senior Member
Senior Member
Avatar

Joined: 14 Dec 2007
Location: India
Online Status: Offline
Posts: 162
Quote Savan Replybullet Posted: 31 Jan 2008 at 4:33am
Eany
 
do u want to supress the box ?
Thanks
Savan
IP IP Logged
Eany
Newbie
Newbie
Avatar

Joined: 21 Nov 2007
Location: United Kingdom
Online Status: Offline
Posts: 17
Quote Eany Replybullet Posted: 31 Jan 2008 at 4:49am
Thanks for your ongoing help Savan.

The detail line has a description and the box.
If there is a description, I want to see it and the box.
ie   the line should not be suppressed.

But if there is no description ( null or spaces), then I want to suppress the complete line.

At the moment, I am getting lines with no description, but with the box printed.
Eany
IP IP Logged
saoco77
Senior Member
Senior Member


Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
Quote saoco77 Replybullet Posted: 31 Jan 2008 at 5:09am
Another approach might be to create a formula with a slightly modified version of your first approach

formulaEX

if isnull({Description}) then 1
else if {Description} = " " then 1
else 0

And then in the section expert set the details section to suppress if formulaEX=1

This may need to be modified slightly depending upon how empty values are handled in your database.

Hope this helps.
Sarah
IP IP Logged
Eany
Newbie
Newbie
Avatar

Joined: 21 Nov 2007
Location: United Kingdom
Online Status: Offline
Posts: 17
Quote Eany Replybullet Posted: 31 Jan 2008 at 6:59am
thanks to Savan & Sarah
Report fine now.
Eany
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