Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: Suppress Empty Text Box Post Reply Post New Topic
Author Message
doctork11
Newbie
Newbie
Avatar

Joined: 29 Jul 2013
Location: United States
Online Status: Offline
Posts: 5
Quote doctork11 Replybullet Topic: Suppress Empty Text Box
    Posted: 30 Jul 2013 at 6:30am
Okay, here's my problem. I have 8 formulas. Each formula is similar to the following: "Text: " + {Command.CODE} + " - " + {Command.DESC}.
 
Then I add these formulas to a text box on the report. I format the text box to suppress if {@fmt1} = "Text:  - " then true else false
 
The box is suppressed, but I want the report to "fit" the section as well.
Here's the layout:
fmt1    fmt2
fmt3    fmt4
fmt5    fmt6
fmt7    fmt8
 
If fmt3 - fmt8 are "empty" by the suppress formula, then fit the section to the bottom of fmt1/fmt2
 
Is that possible?


Edited by doctork11 - 30 Jul 2013 at 6:31am
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 31 Jul 2013 at 5:10am
Resize the text box so that just fmt1 and fmt2 show.  Then right-click on it, select "Format...", and make sure that "Can Grow" is turned on.
 
Then, change your formulas - fmt1 and fmt2 stay the same, but the rest of the odd numbered ones will look like this:
 
if (not IsNull({Command.Code}) then
chr(13) + chr(10) + Text: " + {Command.CODE} + " - " + {Command.DESC}
else ''
 
And the even numbered ones will look like this:
 
if (not IsNull({Command.Code} then
chr(9) + Text: " + {Command.CODE} + " - " + {Command.DESC}
else ''
 
chr(9) = Tab character
chr(10) = Line Feed
chr(13) = Carriage Return
 
Take the manual returns out of the text box and let the formulas handle it.  So, what's in the text box might look like this:
 
{@fmt1}      {@fmt2}{@fmt3}{@fmt4}{@fmt5}...
     
If you have any data in the same section as the text box but which is displayed below the text box, create a new section under this section and move the fields to the new section.  The section that your text box is in will grow based on the size of the field and the other data will automatically appear below it no matter what the size is.
 
-Dell
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.