View Full Version : problem with multi lines
07-19-2002, 08:54 AM
i want show my text area in jfreereport.but when i set label in run time that time i get only single line...
So plz give me Idea how can i solve this problem .
plz u give me code, and how can do exact size that textarea label in report.
My second problem is if i not using Items element that time i did't get page header date in first xml example in jfreeereport demo.
Thank For Advance
07-20-2002, 05:05 PM
to enable the multiline printing in text elements, your elements height must be large enough to include all text lines to be printed. The number of lines in an text element is calculated by dividing the elements height by the fonts height.
So when you want to print 5 lines using a 10 pt font, you have to set the height of the element to at least 50 pt.
Your second problem is caused by a bug in JFreeReport's function evaluation which is fixed in the current cvs release. Either check out the sources from cvs or wait until tomorrow, when the next version will appear.
Have more fun,
08-16-2002, 03:54 AM
the suggested solution will work with a fixed number of rows. But if they're changing (for example it has only one row to print) you will've the problem that you've empty lines?
Do you have a solution for a "dynamic" version for this problem.
08-16-2002, 04:08 PM
yes, there is a dynamic patched version in the cvs, but be warned, it has some severe side-effects (Page-Break recognisation does no longer work correctly if the band size changes).
To enable the patch, you'll have to set the "Dynamic" property of TextElement to true (using setDynamic(true)). This is not supported by the parser, you'll have to change it manually.
Be Aware: It is not likely that this functionality will survive the implementation of the LayoutManagement (due to the sideeffects), but currently it is a quick-fix. I'll start the Layout-Task during the next week, (as soon as the expression-Task is completed). After the layoutstuff, the next release is done ... that will be someday in september ...
Have more fun,
08-17-2002, 02:50 AM
thanks for your answer. I think the existing solution for multi lines can be used and I don't need a dynamic version with Page-break problems at the moment.
For my specific problem I found a solution using the grouping functions. This means I create a new group and the group-items representing the dynamic lines.