円グラフを含むレポートがあります。クエリが結果を返すか、何も返さないかに関係なく、グラフを表示したいと思います。通常、関数を実行するだけで済みますがplot.setNoDataMessage()
、これは 内で公開されていないため、次のようiReport
にクラス内で実行しました。Customizer
CategoryPlot plot = (CategoryPlot) chart.getPlot();
plot.setNoDataMessage("No data available so we go into this really "
+ "long spiel about what that means and it runs off the end of the "
+ "line but what can you do about that!");
ただし、データが返されない状態で実行すると、空白のページが表示iReport
され、「ドキュメントにページがありません」というポップアップが表示されます。
お知らせ下さい。