taylort2
asked on
Hide/show a picture using global variable
Is it possible to hide/show a picture using a global variable?
I am trying to use the code below for the picture suppression but it does not work. I am getting "Formatting formulas must be print-time formulas." Is there a way around this?
I am using a variable because the data is on a previous section which I am using to determine whether to Hide or Show the picture.
I am trying to use the code below for the picture suppression but it does not work. I am getting "Formatting formulas must be print-time formulas." Is there a way around this?
I am using a variable because the data is on a previous section which I am using to determine whether to Hide or Show the picture.
WhileReadingRecords;
global booleanvar bSuppress;
If bSuppress then
True
Else
False
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What formula changes the alue of bSuppress?
mlmcc
mlmcc
ASKER
In a Formula field, I am using
WhileReadingRecords;
Global BooleanVar bSuppress;
If {field.value} = 0 then
(bSuppress := True;)
Else
(bSuppress:=False;)
WhileReadingRecords;
Global BooleanVar bSuppress;
If {field.value} = 0 then
(bSuppress := True;)
Else
(bSuppress:=False;)
ASKER
I fixed the problem. Using WhilePrintingRecords; that you suggested, I also changed the Global to Shared and the code now works.
WhilePrintingRecords;
Shared BooleanVar bSuppress;
If {field.value} = 0 then
(bSuppress := True;)
Else
(bSuppress:=False;)
WhilePrintingRecords;
Shared BooleanVar bSuppress;
If bSuppress then
True
Else
False
Thanks for the Assist.
WhilePrintingRecords;
Shared BooleanVar bSuppress;
If {field.value} = 0 then
(bSuppress := True;)
Else
(bSuppress:=False;)
WhilePrintingRecords;
Shared BooleanVar bSuppress;
If bSuppress then
True
Else
False
Thanks for the Assist.
Shared shouldn't matter since that is for sharing data with a subreport.
mlmcc
mlmcc
ASKER
I am using Crystal Reports XI Release 2 SP5.
Crystal Reports is and has been flaky since Business Objects took over and now with SAP, it's worst just like their website.
Crystal Reports is and has been flaky since Business Objects took over and now with SAP, it's worst just like their website.
ASKER