Jasper Report: Text field overlapping end of page - jasper-reports

Jasper report version 5.6.1 (due to a jdk 1.6 we MUSt use.....)
I have a report with a long text field in the bottom part of the page.
If i set Position type to "Fix Relative to Top" the text field will spread over the end of the page and the start of the next page using space available at the end of the first page (so from my point of view this is a correct behaviour, or may be the behaviour i'm searching for)
If i set position to float, the text (and the caomponent) will be moved directly to next page, so some part of the first page is not used at all, and all the text is printed on next page.
I have the same behaviour with a fixed text and with a text with field (evaluated at runtime).
I have tried to set Strech type to:
1) Relative to tallest object
2) Relative to Band Height
All previous element in the report are set to float (static text and text field)
So i would like to use remaining space on first page to print some line of this text Field , and use second page to print remaining text. Available space on first page is variable due to variable height of previous component on first page, so i cannot use Fixed position for this field.
Any idea will be appreciated

Related

Can we have margin for a TEXT report in JASPER defined per line without a page margin or width

We are using Jasper to generate a TEXT report which will be used by a PRINTING SYSTEM to print the report. We are able to successfully generate a report but we need the margin or a line break to appear based on each line and not take the default page margin. It should not be using the page margin which is fixed per report . We also tried to use the property trim.line.right setting to TRUE which does remove the entire right spaces and does left shift the line margin. But we need some space to be padded to the right per line based on the attribute.
Is there a way to disable the page margin or a property to set which overrides the default page margin for a TEXT report . Any help would be greatly appreciated.
Thanks

Jasperreports Textbox shouldn't split across page

currently I'm trying to have a small PDF rendered with Jasperreports.
The PDF is really really simple, it contains some info on the left and a Text that changes in his size on the right.
However currently the List Subreport gots splitten so that the text box will got cut half if the last text box overflows the page, how to prevent that??
Here is my Report: http://pastebin.com/Yfct9qqc
I just want that if the element in the detail band overflows the page it should be printed on the next page, is that possible?
Currently it will just overflow the text field on the right or if i specify the left box get repeated..
Fixed by setting split type to "Immediate" and changed the print order to "horizontal"

How to remove empty space after last row when using Can Grow option on text fields in Crystal Report?

I have a report displaying rows with text fields with variable length (I use the Can Grow option). I use a Box for the details. My problem is that when the last text field cannot fit into to the box on the bottom of the page, a empty space is left, and the new row begins on next page. Unchecking the option Keep Object Together on the fields, didn't solve the problem and if it did I don't want the content of the text field to break across pages.
My question is: Is it possible to auto-re-size box height depending on rows content, so I can avoid empty spaces at the bottom on every page (doesn't look very nice).
Thanks in advance.
There are three things I can think of that might help.
As you said, you can limit the maximum size of a "can grow" field. To the right of the can grow checkbox (in CR designer) there is a "Maximum number of lines" value that defaults to 0 (no limit). You can set that to however many lines you like.
The details section itself has a setting for "keep together" too -- right-click the details section label and go to the section expert. If you uncheck it there the details section will start on the bottom of the page and continue on the next one.
Look at the page footer section, it is printed at the bottom of each page, and if it is large, it takes away from the available space for the data. Group footers, if you have any, could give you the same problem.

JasperReports: Subreport properties "Print In First Whole Band"

First sorry for my English - it's not native for me.
I've create report with subreport. Subreport print some records, each textField is surrounded by border (It should look like a table). And when some textField's Height is too large - it breaks and continue to print text on next page - and thats Ok, but the other textField elements in a row are left on previous page - and their borders don't show on new page. This cause the report to look with only alone textField in a row (first row on new page). See attach: Red line - text is carry over to new page. Green markers - text fields left at prev page.
I've tried to use Print In First Whole Band property to avoid row breaking, but Subreport don't react on it. Probably this is JasperReports issue.
Please advice how can I make my report looks fine, without empty spaces instead of borders when starting new page ?

How to handle variable width FieldObjects in Crystal Reports

I have a Crystal Report which is viewed via a CrystalReportViewer control on an .aspx page (using VS2008).
The report has two data-driven FieldObjects (which can contain a variable number of chars) which I would like to display on the same line beside each other.
Problem is when the text in the first FieldObject is too long it overlaps the text in the second FieldObject.
I have tried setting the 'CanGrow=True' and 'MaxNumberOfLines=1' on the first FieldObject to 'push' the second FieldObject further to the right, but this didn't work.
How do I get the second FieldObject to always display immediately after the first FieldObject regardless of the length of the text in the first?
Cheers in advance of any knowledge you can drop.
you can add a text object to the report. And while editing the text of the text object, drag the field you want to show from the object explorer into the text box. Then hit space, then drag the second field in to the same text box. Your two fields will always be one space a part. You could, of course, add more spaces or any other text you want.
Or you can create a function which returns field1 + " " + field2 and add the function to the report.