Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to hide an empty formula 1

Status
Not open for further replies.

PatriciaObreja

Programmer
Jan 14, 2008
204
CA
CR 9 and SQL Server 2000
I Details section a have some formulas like this arranged vertically:
@acct1
@acct2
@acct3
@acct4
@acct5

//@acct1
stringVar array accta := Split({Field}, chr(13));
if count(accta) >= 1 then
accta[1]
else
"";

The other ones are very similar.
So I have a field that comes from the database using a stored procedure with information separated by char(13).
In Crystal I split the infromation, and each value goes to a formula.
I want that when the result of the formula is blank, to not take space from my report. I don't want to see blank, I just don't want to see it at all, to hide it, or something else.

I've tried all the possible combinations, and I think that the one that might work will be to create a Detail section for each formula, with the report is already full of subsection, and I have 10 formulas, and I really would like to have a simpler solution if possible.

-----------------------------------------------------------------------------------------------------------------------------
"Now I can look at you in peace; I don't eat you any more." Franz Kafka, while admiring fish in an aquarium
 
I would put each of them into their own detail_a, detail_b section, etc., and then format each section to "suppress blank section". This will minimize the vertical space.

-LB
 
lbass thanks for your answer, but, as I said, the report has already too many subsections, I already have 9 Detail subsections, and for each of them I need 10 more sections, that will make 90 Detail subsections.
I really want to avoid that.

-----------------------------------------------------------------------------------------------------------------------------
"Now I can look at you in peace; I don't eat you any more." Franz Kafka, while admiring fish in an aquarium
 
You could instead place the fields in a text box in the detail section. After entering the fields, make the text box fit only one row and then format it to "suppress embedded blank lines" and "can grow".

-LB
 
This works, thanks!

-----------------------------------------------------------------------------------------------------------------------------
"Now I can look at you in peace; I don't eat you any more." Franz Kafka, while admiring fish in an aquarium
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top