jasper reports - Subreports dependancy -


is there way show 1 subreport if other subreport doesn't have rows (doesn't return rows).

what have tried:

in first subreport returned number of processed rows "report_count" master report variable "subreport_var". variable "subreport_var" works should. added additional text field master report , output variable it. set evaluation time of text field band, without doesn't work correctly.

further set option "print when expression" of second subreport to:

$v{subbreport_var} < 1

i use jasper studio 5.5.0 final.

if there no row count wouldn't result null. if you use in print when expression in second subreport:
$v{subbreport_var}==null

another option run query in main report , use subreport expression:

if($f{some_var_from_your_query}==null,subreport2.jasper,subreport1.jasper

this prints subreport2 when some_var_from_your_query returns null if not prints subreport1.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -