hide a sub report containing a chart pentaho

1k views Asked by At

Hi we are using Pentaho report designer and we want to hide a subreport if there is no data .

We have tried to use this formula :

not(isemptydata())

in the visible expression but it does not seem to work .

So how to hide a subreport if no data .

2

There are 2 answers

1
Venkatesh Panabaka On BEST ANSWER

Here you are using all small letters like not(isemptydata()). You can't use like that all are capitals like =NOT(ISEMPTYDATA()). You add this line to your report it will work i think.

Otherwise also you can hide that sub report =IF(ISEMPTYDATA();"False"; "True").

Thank you..

3
Andrei Luksha On

Try to set =NOT(ISEMPTYDATA()) formula on sub-report-active attribute of your subreport. This attribute can be modified on "Attributes" tab under "common" attributes group:

location of the attribute in PRD gui

As far as I understand "visible" property uses the dataset of the parent sub-report, while sub-report-active uses the data-set of the current sub-report. (See Taqua's post #6 in http://forums.pentaho.com/showthread.php?62194-Hide-a-Subreport-if-No-Data/page2)