Image control properties in Reports

Hi all,

Is there a way to change the visible property of an image control in a Report?

What I need to do is something like this:

IF condition = TRUE THEN

image1.VISIBLE := TRUE

ELSE

image2.VISIBLE := TRUE;

Is there a way? I am pretty sure there isn’t [:)] but I’m hoping someone could help me…

Thank You all.

Hi Jose,

You’re on the right track, at least if you are talking about the reports for the RoleTailored client (always write what version your questions are about - otherwise the people to answer will not know [:)]). Here you can define a variable which is used as a condition in the HIDDEN property.

As for the classic reports, then you can not program this. But there are two options to archive it anyway.

Either in the way it’s done for the standard invoice report (no. 206). Here you have the logo define three times in the report, but only displayed once. This is done by only “calculating” the image value (stored in a BLOB field for the control you actually are using).

The other option is to define two different report sections containing the image and only displaying the one you want (by using SHOWOUTPUT(Condition) in the OnPreSection trigger of the section).

the simple way, use section, and put ‘CurrReport.SHOWOUTPUT(condition);’

Thank you all for your help [:)] …

First of all, I’m using Navision Version PT 3.70(4.0 SP3).

I solved the question using two different group footers and placing some code on the OnPreSection.

What I did was set the default behaviour of those group footers as CurrReport.SHOWOUTPUT(FALSE). Then by testing the condition I had set them to TRUE.

I had to do some more evaluations using CurrReport.TOTALSCAUSEDBY, but I manage to get the correct output.

Once again, thank you.