carloscaballeromorel Posted January 26, 2016 Posted January 26, 2016 Hi, I'm doing a report with iReport 5.5.2 and now have the task of removing blank pages sometimes generated. There are many situations where my report could generate a blank page which I have already responsible for most, but one that can not fix. The basic structure of the report, which is usually very large, is: 1) Title: Here there are many more data than just the title, but data show that only once so it seemed appropriate place here. 2) Detail: there are only many subreports that can bring a lot of data or none. 3) Footer: number of pages Then there is nothing more to be significant, except that after the title is required a page break (do not want the detail to appear just after the title). The problem is precisely there, I generated a blank page if no data in detail (detail the combination of vacuum and newline). In short, there is a way around that is generated blank sheet? try putting the leap in detail and "print WHEN expression" underreporting of some variable to indicate if data were me or not but apparently is evaluated first print When the underreporting. The dilemma is that asks me if I want to print before I can know if I need to print or not. From already thank (my first question on the forum, do not append code because given the case I did not seem necessary, and I am using google translator, so I hope you understand the question).
joseng62 Posted January 27, 2016 Posted January 27, 2016 I have not worked on iRerpot for awhile now. I am using Jasperstudio. There should be a "When no data type" option in your report properties. (main report and subreports) Then select "No Pages". Also reduce your sub report high in the main report and ensure you detials band has no trailing space. (Meaning reduce detailed band so a sub report just fit on.)Also remember to get remove any band you are not using.I have not worked on iRerpot for a while now. I am using Jasperstudio. There should be a "When no data type" option in your report properties. (Main report and sub reports) Then select "No Pages". Also reduce your sub report high in the main report and ensure you details band has no trailing space. Some of my sub reports are 5 pixels high.(Meaning reduce the detailed band so a sub report just fit on.)Also remember to get remove any band you are not using.“When to print”, removes the visual aspect, but still occupies the space.When to print remove the visual aspect, but still occupies the space.
carloscaballeromorel Posted January 28, 2016 Author Posted January 28, 2016 Hello, actually that's not the problem. The blank page is generated because there is a page break but then no data, ergo blank page. From sub report I could get a variable to see if brought or not data, but the report asks me first if I print the newline before running the sub reports, I find no way to reverse time, to print the correct order: first sub reports, now is whether or not data brought after the newline, on condition that there is data. Equally already found a solution, somewhat forced, I have another sub report much lighter going to the database and returns me if other subreports will bring data, this will run before the newline, so to evaluate the jump and I know if I'm going to get or not data. By the way I found to deal exclusively with the detail in my case as subreports instead of underreporting compress to a minimum, just to use the "print when" detail band (which includes the start line break without conditions). Thank you. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now