wish of those help It is possible with JasperReports. What i recommend is using iReport tool (or some other JasperReport visualizing tool). Just like each report, a subreport has a dataSource. When it is null/empty, the subreport should not render. In iReport, utilize the scripting language available (usually Groovy) and do conditional rendering of the Detail band that is hosting your subreport.
Cannot retreive JasperReports properties from jrxml file