Dont print pages when crosstab report with own dataset have no data

I have report with main report query that return one row always

SELECT to_date($P{param0},'yyyy-mm-dd HH24:MI:SS') AS dtstart,
to_date($P{param1},'yyyy-mm-dd HH24:MI:SS') AS dtend
FROM dual

In detail bands I have crosstab reports, that have own datasets, when crosstab dataset dont return data, iReport print blank page but in report property "When no data"="NoPages", how to avoid it and dont print blank page. I know one method for this use crosstabs query in main query how in this example:

SELECT to_date($P{param0},'yyyy-mm-dd HH24:MI:SS') AS dtstart,
to_date($P{param1},'yyyy-mm-dd HH24:MI:SS') AS dtend
FROM dual
WHERE EXISTS (SELECT * FROM crosstabdataset)

but whether there are other ways?

dretwk's picture
46
Joined: Mar 17 2015 - 4:03am
Last seen: 4 years 7 months ago

2 Answers:

Have you tried using subreports for the crosstab? Make sure to match main and sub dataset in the subreport.

hozawa's picture
177505
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 12 months ago

What did you mean match main and sub dataset in the subreport, can you describe please?

I rephrase the question I'm need, that if subreports dont return data, a main report should not print blank page...

As I understood the decision at the report level does not exist, and I m need to use subreport query in main query?

dretwk's picture
46
Joined: Mar 17 2015 - 4:03am
Last seen: 4 years 7 months ago
Feedback
randomness