使用 JasperReports 在每个页面上创建折叠机的 OMR 图像

发布于 2024-10-09 09:15:25 字数 1291 浏览 0 评论 0原文

我们的发票系统需要在发票的每一页上打印 OMR(光学标记识别)符号,以便折叠机知道在信封中放入什么内容,因此必须在每一页上放置小 PNG 图片。 我们的发票由主报告和在特殊 .jrxml 文件中创建的两个子报告组成。图片是通过调用 Web 服务生成的,并在 http 请求中传递页码作为参数。因此,我们需要将图片合并到子报表中,希望子报表在生成文档时能够“知道”实际页码。我们收到的错误是:

Error filling print... Could not resolved style(s): pdf 
net.sf.jasperreports.engine.JRRuntimeException: Could not resolved style(s): pdf      at 
net.sf.jasperreports.engine.fill.JRFillObjectFactory.checkUnresolvedReferences(JRFillObjectFactory.java:1610)      at 
net.sf.jasperreports.engine.fill.JRFillObjectFactory.setStyles(JRFillObjectFactory.java:1537)      at 
net.sf.jasperreports.engine.fill.JRBaseFiller.loadStyles(JRBaseFiller.java:962)      at 
net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:835)      at 
net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:782)      at 
net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:532)      at 
net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:63)      at
 net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:209)      at
 java.lang.Thread.run(Unknown Source)

我们正在使用 JasperReports 3.0.0 - 迁移到较新版本需要进行大量更改,因此目前无法选择,以防我们需要转到较新版本。

Our invoicing system needs to print OMR (optical mark recognition) symbol on each page of our invoices so the folding machine knows what to put in the envelope, so that little PNG picture has to be put on each page.
Our invoice is consisted of main report with two subreports created in special .jrxml files. Picture is generated by calling web service with passing page number as a parameter in http request. So, we need to incorporate picture into subreport hoping that subreport will 'know' actual page number when generating document. Error we are getting is:

Error filling print... Could not resolved style(s): pdf 
net.sf.jasperreports.engine.JRRuntimeException: Could not resolved style(s): pdf      at 
net.sf.jasperreports.engine.fill.JRFillObjectFactory.checkUnresolvedReferences(JRFillObjectFactory.java:1610)      at 
net.sf.jasperreports.engine.fill.JRFillObjectFactory.setStyles(JRFillObjectFactory.java:1537)      at 
net.sf.jasperreports.engine.fill.JRBaseFiller.loadStyles(JRBaseFiller.java:962)      at 
net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:835)      at 
net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:782)      at 
net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:532)      at 
net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:63)      at
 net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:209)      at
 java.lang.Thread.run(Unknown Source)

We are using JasperReports 3.0.0 - migration to newer version requires lot of changes, so that's for now out of option, in case we need to go to newer version.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

深居我梦 2024-10-16 09:15:25

通过将图片放在主报告的“背景”带上来解决。图片定期在每个页面上显示一次。

solved with putting picture onto band called 'background' of main report. Picture is being shown regularly on each page once.

仙女山的月亮 2024-10-16 09:15:25

有一个名为 Mail Markup 的出色应用程序,它可以在您喜欢的任何文档上添加 OMR 标记。它允许您根据您的要求配置 OMR 标记,因此它与任何文件夹插入器兼容。您可以在此处了解更多信息并下载评估报告

There is a great application called Mail Markup that will put OMR marks on any document you like. It allows you to configure the OMR marks to your requirements so it is compatible with any folder inserter. You can find out more and download an evaluation here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文