开发者

Java Jasper Reports iReport

I am having a problem in using a iReport.

I have a general master report and that master report contains 3 sub reports and also these each subreports contain subreport. While I am not having a problem in printing those 3 subreports individually and also the开发者_Python百科ir subreports in the preview mode of iReport, I can't print them while they are together in the master report in the preview mode. I have included all the parameters and fields needed for executing the query in every reports (I mean the subreports and their master report). However, no way! It doesn't work...

Any help will be greatly appreciated...


I've seen this happen a few times, the preview wouldn't work, but when I tried to run the report from the application in my local workspace everything ran fine. I think the issue may be that the subreport doesn't have data and that causes problems. You may want to add print when expressions to the subreports so they don't run unless there's data.


The solution to the problem is to generate the sub reports from scratch, not by copying and pasting the similar report. In my case, the sub reports in the report look very much similar in many patterns so I have just copied one of them, pasted them on the main report and changed what is needed to be changed (such as fields, names or the queries inside them) on the pasted sub report. At first sight, while I am previewing the sub reports independently from their main report, they just look fine but while I am trying to preview the main report, the sub reports in the main report are not printed. So I accidentally (those times I were a novice user of the iReport) tried to generate the sub reports from scratch. (Scratch I mean: File -> New -> Launch Report Wizard -> Selecting the database I'd like to work on and entering the query which I'd like its results to have the datum to be printed on the report and so on) and by magic; the sub reports which are seemed to be not working, begin to work and get printed on their main report.

Thanks for all the replies...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜