fralx / LimeReport

Report generator for Qt Framework
http://limereport.ru/
Other
403 stars 154 forks source link

set visibility of imageItems #347

Open TobiasAll opened 3 years ago

TobiasAll commented 3 years ago

Hello,

how can i change the visibility of a imageItem via script?

fralx commented 3 years ago

Hi! You can use the initial script for this purpose. You can write some functions that will run before rendering the band and change the item's visibility.
For example:

Reportpage1_DataBand1.beforeRender.connect(DataBand1BeforeRender)
function DataBand1BeforeRender() {
    Reportpage1_ImageItem1.isVisible = getVariable("showImage") === "true"
}
TobiasAll commented 3 years ago

It worked, thank you