View Full Version : problem with multi lines
Anonymous
07-19-2002, 08:54 AM
Hello All,
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
sandy
Anonymous
07-20-2002, 05:05 PM
Hi,
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,
said Thomas
Anonymous
08-16-2002, 03:54 AM
Hi,
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.
Thanks
Klaus
Anonymous
08-16-2002, 04:08 PM
Hi,
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,
said Thomas
Anonymous
08-17-2002, 02:50 AM
Hi,
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.
Bye,
Klaus