Jasper Hiding Page Break on Specific Pages - jasper-reports

Hi I want a page break that goes after each group except for the last group. Currently my page breaks separates all the groups nicely, but I would like the last group to be connected to the last page. The page break separates my last page footer, leaving a huge amount of space on the last page. Is there any way to do this?
I'm thinking of hiding the last page break but I'm unsure of how to do it.
Attempts to do a put into $P{REPORT_PARAMATERS_MAP} within the print when expression band of the summary band have been unsuccessful.
I tried placing the following into the 'print when expression' band of the summary band:
new Boolean($P{REPORT_PARAMETERS_MAP}.put("LastPageNumber",new Integer($V{PAGE_NUMBER}.intValue()-1)).equals("dummyPrintWhen"))
And using this on 'print when expression' of the break:
new Boolean(!$V{PAGE_NUMBER}.equals($P{REPORT_PARAMETERS_MAP}.get("LastPageNumber")))
But it's not working the way I want. It still gives me the last page footer all by itself on another page while still leaving a large amount of space on the previous page.
By taking out "!" on the break's 'print when expression', the breaks don't happen and I get my last page footer on a page all by itself as there is no more space on the previous page.
----------------------------EDIT--------------------------------
Printing $P{REPORT_PARAMETERS_MAP}.get("LastPageNumber") for every page
gives me null.
----------------------------EDIT--------------------------------
What am I doing wrong?
I'm currently using iReport 3.0.0

What if you use ?
new Boolean(new Boolean($V{PAGE_NUMBER}.equals($P{REPORT_PARAMETERS_MAP}.get("LastPageNumber")))==false)

I think what I'm trying to do might not be possible simply because the last page number can only be compiled at the end of the report, while the page breaks happen as the report is compiled.
I think this can be confirmed by nobody answering the question on this page: http://www.coderanch.com/t/579950/open-source/Jasper-report-store-total-number

Related

Detail sections not printing if previous section fills entire page

My report has three detail sections. The first 2 contain sub reports. If either of the first two sections expands to be exactly large enough to fill the page, the following detail sections don't print at all.
I would expect a page break to be triggered and the following sections be printed on the next page, but this doesn't happen if it's nearly the size of the whole page, or greater. How can I fix this?

Jasper report: supressed first page footer leaves blank space

I need different page footers for first and other pages.
I placed one footer in page footer band and other in column footer band
I set Print When Expression for page footer band as $V{PAGE_NUMBER} > 1
https://dl.dropboxusercontent.com/u/1383480/work/QIP%20Shot%20-%20Screen%20454.png
Jasper starts to print page footer from second page, but it leaves blank space on first page (both in preview and docx export).
https://dl.dropboxusercontent.com/u/1383480/work/QIP%20Shot%20-%20Screen%20455.png
I tried to set remove line when blank on all text elements, it doesn't help
My jasper reports is 5.6, target format is docx
How do I remove blank space on first page?
You can try to use net.sf.jasperreports.export.{format}.exclude.origin.{suffix}.{arbitrary_name} property for excluding page footer for exporter.
http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.{format}.exclude.origin.{suffix}.{arbitrary_name}
Maybe it will be helpful:
It is stated on 108 of the Jaspersoft Ultimate Guide PDF that the page
footer always retains the declared fixed height.
Add it as a standard field perhaps into another band and then print
only on page one using a PrintWhenExpression (see pg 119 of the
ultimate guide). Include an expression that effective means it only
prints on page one, something like:
$V{PAGE_NUMBER} == 1
If you need it on the bottom there are options to align the element to
the bottom of the band IIRC.
From: http://community.jaspersoft.com/questions/822453/page-footer-space-removal-dynamically
Here is one approach using fake group footers
https://community.jaspersoft.com/jasperreports-library/issues/4074-0

How do i have the report footer ONLY appear on last page in Reporting Services?

I have a report footer that i want to appear on the last page only of my report. I have the option selected that says 'Print on Last Page' as True. I also have the option to print on first page as false. However, when i have an invoice say 4 pages long, the footer shows up on all the last three pages.
thank you for your suggestions.
You could try placing the content at the end of your report, making sure it is outside of any grouping object (list, matrix, table).
If the content is at the end of the report, it will always be on the last page and only the last page. No footer or special group is needed.
You can position it on the last page by leaving some empty space between the content you want at the end and the rest of the report. Check your report height and width settings.
Good luck.

Remove page numbering from a section break

Does anybody have a clue about how to remove the page numbering from a section break in a word 2007 doc?
I have to put 3 documents together
1st part contains the page numbering and the formatting
2nd part ends takes the numbering from the 1st part and continues it. It ends with a section break(next page)
3rd page also takes the numbering (the numbering starts from 1) and I don't want that.
The last part contains some covers and other info pages and I don't want any numbering on them.
The 2nd and 3rd parts were inserted using AltChunk. I've tried locking the 3rd part for editing, i've tried putting a white rectangle over the footer, in front of the text, i've tried putting a section break (continuous) at the beginning of the 3rd part...all for nothing. The 3rd part simply adopts the same footer as the previous parts.
Can you please give me any feedback, ideas on how to find a solution or a workaround?

Vertical line problem in the detail section of Crystal report

I have a little problem with the vertical lines in Detail section. In detail section at the end there is horizontal line. Also I have Report Footer section which displays total number of records. I suppressed Page Footer section.
I would like end all the vertical lines to the last line of the records not to extend beyond the "Total"(Report Footer).
It works fine if everything on the same page. The problem starts when the last line of the detail is on the first page and the "Total" wouldn't fit on the first page. It displays "Total" on the second page and it draws vertical lines to the end of the page.
Thanks for any suggestion.
I faced the same problem recently and resolved it just now. Just want to share what I did to resolve this problem for those who are stuck in this CR dilemma :).
Create a detail section below the detail section with the vertical lines then suppress it.
That's it! worked like a charm. Hope this helps.
Usually Crystal displays lines properly, when they start and end in
matching group sections (1st header - 1st footer). If they start in
page header and end in details for example, then result is often
undefined. Or from detail to page footer - result is undefined again.
An old question but thought i would add my findings. Thanks to #Arvo explanation above this led me to figure out why i had this issue. A report i was amending had a line object about 2-3 pixels over the boundary of the detail and header section, this caused the line to repeat on every single detail section regardless of intervening suppressed sections (there where no groupings).
Moving the line object so it didnt cross the boundary meant it only appeared in the detail sections it went over :)
Do your vertical lines start and end in matching sections? Dou you have any groups defined?
Usually Crystal displays lines properly, when they start and end in matching group sections (1st header - 1st footer). If they start in page header and end in details for example, then result is often undefined. Or from detail to page footer - result is undefined again.