0
votes

I'm trying to suppress a logo based on a boolean @Accredited that changes later in the report.

if {@Accredited} = false then
    true
else
    false

The image is in the header, but @Accredited is further down and updated from a subreport. That all works great, but the header suppression doesn't seem to work. It's as if it checks if @Accredited is true or false the first time but never refreshes. How can I make sure the logo suppression checks after the report is finished completely?

This is the @Accredited formula:

Shared booleanvar bAccredited;

bAccredited;

bAccredited is set inside the subreport. This way I can see the value returned when debugging. There is more going on inside of the subreport, but it ultimately sets bAccredited to true or false, which is then picked up and displayed properly by @Accredited.

1

1 Answers

1
votes

You could try using whileprintingrecords; which forces a formula to evaluate after the records have been loaded, but before things are displayed on the page.

Rewrite your suppression formula to look like this:

Whileprintingrecords;
{@Accredited} = false

If this fails to work, you may have the option of making another subreport in the header, which performs the same calculations necessary to determine whether or not the header displays. From there you can grab the boolean return value and suppress.