[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Hide/show a picture using global variable

Posted on 2009-05-12
7
Medium Priority
?
531 Views
Last Modified: 2012-05-06
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.
WhileReadingRecords;
global booleanvar bSuppress;
 
If bSuppress then
   True
Else
   False

Open in new window

0
Comment
Question by:taylort2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 1500 total points
ID: 24368560
Yes it is but you have to set it during the WhilePrintingRecords pass..
Variable values are not retained during other passes.

Change the WholeReadingRecords to WhilePrintingRecords

mlmcc
0
 

Author Comment

by:taylort2
ID: 24376968
The picture is always shown even if it's not suppose to.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 24377231
What formula changes the alue of bSuppress?

mlmcc
0
How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

 

Author Comment

by:taylort2
ID: 24377775
In a Formula field, I am using

WhileReadingRecords;
Global BooleanVar bSuppress;

If {field.value} = 0 then
   (bSuppress := True;)
Else
   (bSuppress:=False;)
0
 

Author Comment

by:taylort2
ID: 24378900
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.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 24379899
Shared shouldn't matter since that is for sharing data with a subreport.  

mlmcc
0
 

Author Comment

by:taylort2
ID: 24385394
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.  


0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question