使用速度模板打印 JasperReports
我正在使用速度脚本引擎,我有一个 xml 模板文件,其中包含如何打印报告的格式。我正在从 JTextarea 获取输入并打印 pdf。
模板文件具有:
<line>
<text align="left" length="15">Message:</text>
<text>${report.printMessage()}</text>
</line>
现在,如果文本框有多行,那么它会在一行中打印。如果文本区域有换行符,我希望它在不同的行中打印..
请帮助.. 谢谢
I am using velocity script engine , i have a xml template file which has a format of how the report should be printed . I am taking the inputs from a JTextarea and printing the pdf.
The template file has :
<line>
<text align="left" length="15">Message:</text>
<text>${report.printMessage()}</text>
</line>
Now if the text box has multiple lines then it is printing in a single line .I want it be printed in different lines if the textarea has a newline ..
Please help ..
Thankx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧...所以这是答案..
用户循环..
这里 printMessage() 返回 java.util.List :
okay ...so here is the answer ..
user for loop ..
here printMessage() is returning java.util.List :