How to make the height of a list dynamic in jaspersoftt studio? - jasper-reports

Good evening,
I have a list type element that contains two text boxes, when the first text box is empty it shows me the white space between the previous text box and the new one that is going to be printed.
However I would like to know If there is a way to reduce that blank space, that is to say that it is printed as if that record did not exist. As I mentioned above and probe with the print when expression and only "hide" but the blank space is not disappeared.

Related

Fillable Pdf multi-line, Allow rich text formatting in Acrobat Pro DC: but it ignores line spacing/leading set in More

I'm on Win10, using Acrobat Pro DC 2021.011... to edit and Reader DC (same version) to test.
From experience and from reading forums etc, forms in these apps are maddening... but I have not been able to find any discussion (or solutions) to the following behavior...
The form I'm building for other employees' use has a large edit text box set to Multi-line and Allow Rich Text Formatting. It is set to a default font, Calibri and size 50pt. For most situations this will work for them; provides 2-3 lines for a short product description. But occasionally they want a smaller font and more lines... They know how to get the ctrl+e properties bar. But in my testing of this alternative situation they'll need sometimes, I'm finding it's impossible to get the smaller font size and more lines to work. Here's my process.
tab into text box. Ctrl+E for properties bar.
before typing I set the font size to 24
then I type in my 4 lines of text
then I tab to my next form field...
and kaboom... the field I just filled...it's line height is so large it's pushed some of the content invisible. I assume this is coming from the field's default font size, 50
And if I try to adjust the line height, by selecting all the text and then choosing in More...>Form Field Text Properties>Paragraph>Line Spacing
If I set it to Single and click Close/click into another field I get the very large leading (presumably for 50pt font (same as pic above after point 5)
If I choose Exactly and set to point size slightly larger, click Close/out of field, I get another ridiculous result where the 2/3 line have the height I set, but the space between the 1 & 2 second line is way too much and the space between the last line and 3rd line is way too small...
before tabbing or clicking out of field to another field
Good lord.. what is that! 3 different leading values in the same field; just after applying 1 value to all lines, all text in the field...
It makes no sense... it doesn't look like it regards your input at all, and just comes up with it's own random leading... I've fiddled with Space before/after and combinations of Line Height and nothing comes close to what we need... At this point I'm convinced the Acrobat tools for a stylizing text in a multi-line, allow formatting text field are useless. I'd be better off with my employees they can't format anything, ever. Just type one line and hit Tab or Enter...
What is going on! I'm trying to make a simple fillable form for other employees to use, but this kind of behavior makes that impossible (It's enough of a stretch to teach them to use the ctrl+E and do some styling of their text but this is bonkers and completely unteachable... there's not rhyme or pattern to teach!)
Hope someone can help or has seen this behavior too.

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.

How to align lines in Crystal Reports

Is there a good way to make horizontal lines actually line up in Crystal Reports? I can select text and field objects, right-click, and do various sizing and alignments. But that's not an option with a line. I need header fields underlined (and for whatever reason, our standard says to NOT use underline), and I want them to line up across the report.
It's a pain, but I've found one way to do it.
Both field and line items have a right-click menu option called "Size and Position". It doesn't take just any value, especially with Snap to Grid turned on (and doesn't always take exactly what you choose with it not turned on), but you can carefully make sure each line has the same Y value (for horizonal lines). And, if you want them to align and be the same length as the field headers they are underlining, compare each header field X and Width values, and make each line also match that.
In design mode, you can add horizontal guide lines by clicking in the ruler (the vertical one) fields will get sticky to it.
You can also select several fields, right click "Align > Bottoms" and them move the fields to the guide lines.
You can also format a single field to "lock its position and size", then Align the others to it
Another way is to select all the lines you want to left align, move them to the far left with the left cursor key until they hit the left margin and keep pressing the left key until they all align themselves. Just a trick!
Put a bottom border on the header Text Object.

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.