iReport - 动态图像或图像高度
iReport/JasperReports 出现问题,但不确定解决该问题的最佳方法。该报告是典型的订单详细信息样式报告,每个行项目都枚举了数量、描述、名称、价格等属性。
但是,我想解决的问题是显示可选图片作为行项目描述的一部分。每个订单项可以有 N 张详细图片 - 将其视为产品的多个图像(例如汽车引擎盖下、车轮、内部、外部等)。图像数量在运行时显示。
我怎样才能包含这些动态图像?我可以为 9 个图像创建占位符,如果未传入它们则隐藏它们,但这将为没有那么多图像的行项目留下空白。在传递给报告之前,我什至可以将所有杂项图像组合成一个更大的图像,但我仍然遇到尺寸问题。
似乎无法弄清楚如何在带上动态调整大小,同时仍然允许多个可选图像。
有什么想法吗?
having an issue with iReport/JasperReports and not sure the best way to tackle it. The report is a typical order detail style report with each line item enumerated with attributes like quantity, description, name, price, etc.
However, the problem I would like to solve revolves around displaying optional pictures as part of the line item description. Each line item could have N number of detailed pictures - think of it as multiple images of a product (like under the car hood, the wheels, interior, exterior, etc). The number of images is displayed at run time.
How can I include these dynamic images? I could create placeholders for 9 images, and hide if they aren't passed in, but that would leave blank space for the line items that don't have that many images. I could even combine all of the misc images into one bigger image before I passed to the report, but I still have the sizing issue.
Can't seem to figure out how to have dynamic sizing on the band, while still allowing multiple optional images.
Any ideas out there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决您的空白问题。您可以将带区设置为在没有数据时不打印(每个图片/项目需要 1 个带区。或者每个组件都有一个属性“空白时删除行”,如果没有数据/图像可显示,该属性将压缩空间在那水平空间上。
To solve your issue with blank space. You can set the band to not print when there is no data (would require 1 band for each picture/item. Or each component has a property 'Remove Line When Blank' which will compact the space if there is no data/images to show on that horizontal space.