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

0

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
6
Joined: Mar 17 2015 - 4:03am
Last seen: 1 year 2 weeks ago

2 Answers:

1

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

hozawa's picture
52422
Joined: Apr 24 2010 - 4:31pm
Last seen: 5 months 6 days ago
0

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
6
Joined: Mar 17 2015 - 4:03am
Last seen: 1 year 2 weeks ago
Feedback