Height issues in iReport - jasper-reports

I've got a report that needs to print as landscape letter size. This report uses a detailed header for the 1st page, and a more concise header for every other page. The problem I'm running into is that having both headers defined in iReport has made the report too large to fit the letter size constraints (in terms of height).
When I print the report, the correct headers display on their correct pages, but the report is too large and contains massive amounts of whitespace. The printer then tries to center the report and ends up clipping portions of the header and footer so I only get the midsection of the report.
Is there some way to configure my report to have 2 versions of 1 report band (in this case the pageHeader band) and then just provide an expression to determine when each version should print? Or can I group bands together somehow so that iReport knows they occupy the same space?
Any help is appreciated.

I couldn't ever find any sort of fancy way of doing this, so I just made the 2 headers into subreports and included both in the same location on the pageHeader band. Problem solved.

Related

Dynamic space filling in the report

In Jasper reports, I am using JRCollections as a data source to generate the PDF.
Problem Explanation
I want four pie charts to be printed (one below the other) in the PDF.
Chart-1
Chart-2
Chart-3
Chart-4
If the data is not available for chart-3 I want to print Chart-1, Chart-2, Chart-4(one below the other) without leaving the blank space for chart-3.
I tried using <PrintWhenExpression> on some condition but it leaves the blank space if the condition is true.
how to solve the problem without leaving the blank space for chart-3?

jasper report export to xls: extra margins

I've set margins report -> page format -> margins,
it is ok for printing pdf
when exporting to xls I get extra space between page border and report contents
This breaks detail band pagination in more complex reports, I can't print such reports
here is report template, jasper version is 5.6
https://dl.dropboxusercontent.com/u/1383480/work/Blank_A4_Landscape.jrxml
What's wrong with me :)? Where is origin of such extra margins?
Are there any workarounds?
Looks like Excel only during print preview and printing adds sepcific printer margins individual for each printer and this can't be undone

Crystal report remove white space between two words

I am using Crystal Report 10.5 in my desktop application. When i run application, it will show the crystal report with proper data. In some words, it put proper white space between two words. But in some case it will remove white space between the words.
i.e. This is the sentence: "Name with 03/02/1978 and 4 days".
Now when it will print in Crystal report, it shows "Name with 03/02/1978 and4 days". Crystal report removes space before "4 days".
I dont know why crystal report is behaving like this. In some place it will print correctly and in some place it creates problem.
So can any one tell me how to solve this issue?
Thanks in advance.

Jasper reports text field limit

I'm having a .jrxml file in which I have a text field whose width I've set to the maximum possible and I've set the "print when details overflow" and "stretch with overflow flag".
But when generating the report in pdf format from a collection source the text field stretches to 3 lines and for first entry and for next entry it stretches to 5 lines. But the data which I have in collection object is of 7 lines each. While generating the same for .odt format the textfield stretches to 7 lines for both the entries.
What is the issue which I'm facing here?
Solved the issue. I had used Calibri as my font to text field. Changed it to Arial and it stretched to full text.
http://jasperforge.org/node/531750
Referred this link. It had a comment mentioning that certain fonts create problem while exporting to pdf.

How can one tell if a field has wrapped in Crystal Reports 2008?

In Crystal Reports 2008, I need to have an accurate count of all of the lines that have been displayed in a sub report.
I'm using a shared variable and incrementing as needed when lines display. The only problem I'm having now is when a field wraps. We are not using a fixed width font, so going by field length does not solve the issue, as 'i' is not as wide as 'w' and so on.
Is there a way to find out if the data in a field will be wrapped, and if so how many lines it wraps to, or is there a way to find out what the height of the section that the field is in (or the field itself) has grown too?
Or, is there an even better way to count how many lines have actually displayed on the sub report?
No, there is no way to do what you describe.
If you used a fixed-width font, you could then do some math based based on "it wraps at X characters" do if length of string is 100, then it went 2 lines, etc.