如何在iReport中现有的band之间插入detail band?

发布于 2024-10-29 13:40:01 字数 224 浏览 1 评论 0原文

简单的问题。如何在iReport中现有的band之间插入detail band? 例如,我目前的情况:


详细信息 1


详细信息 2


详细信息 3


... 我想在详细信息 2 和详细信息 3 之间添加另一个详细信息带。有什么简单的方法吗?

非常感谢。

编辑:我的意思是设计器/XML 视图。

Simple question. How to insert detail band between the existing bands in iReport?
For example, I have current situation:


Detail 1


Detail 2


Detail 3


... and I want to add another detail band between Detail 2 and Detail 3. Is there any simple way?

Many thanks.

EDIT: I meant on designer / XML view.

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

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

发布评论

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

评论(3

囚我心虐我身 2024-11-05 13:40:02

好的,我找到了解决方案。我切换到 XML 视图并复制 标记之间的所有内容,并将其放入所需的位置。抱歉打扰了。

Ok, I found the solution. I switched into XML view and copied everything between <band> and </band> tags and put into desired position. Sorry for bothering.

开始看清了 2024-11-05 13:40:02

多个详细信息区域可能从 JasperReport 3.5.0 版本开始可用。

JasperDesignFactory designFactory = new JasperDesignFactory();
JRBandFactory bandFactory = new JRBandFactory();

JasperDesign design = (JasperDesign)  designFactory.createObject(designAttributes);
JRDesignSection designSection = (JRDesignSection) design.getDetailSection();

JRDesignBand band1 = (JRDesignBand) bandFactory.createObject(bandAttributes);
JRDesignBand band2 = (JRDesignBand) bandFactory.createObject(bandAttributes);
JRDesignBand band3 = (JRDesignBand) bandFactory.createObject(bandAttributes);

designSection.addBand(band1);
designSection.addBand(band2);
designSection.addBand(band3);

或多或少是这样的。

在 XML 中,您只需创建另一个带,如

设计器中的默认带,该带取决于设计器。例如,在 iReport (3.7.1) 中:

转到“报表检查器视图”,右键单击默认详细信息区域,然后从上下文菜单中选择“添加另一个详细信息区域”。

Multiple details band are available probably since version 3.5.0 of JasperReport.

JasperDesignFactory designFactory = new JasperDesignFactory();
JRBandFactory bandFactory = new JRBandFactory();

JasperDesign design = (JasperDesign)  designFactory.createObject(designAttributes);
JRDesignSection designSection = (JRDesignSection) design.getDetailSection();

JRDesignBand band1 = (JRDesignBand) bandFactory.createObject(bandAttributes);
JRDesignBand band2 = (JRDesignBand) bandFactory.createObject(bandAttributes);
JRDesignBand band3 = (JRDesignBand) bandFactory.createObject(bandAttributes);

designSection.addBand(band1);
designSection.addBand(band2);
designSection.addBand(band3);

More or less that how it goes.

In XML, you just create another band like default one

In Designer that depend of the designer. For example in iReport (3.7.1):

Go to "Report Inspector View", right click on default detail band and from context menu you pick "Add Another Detail Band".

孤独陪着我 2024-11-05 13:40:02

您可以在 OUTLINE 窗口中拖放带区。
因此,“设计视图”中的解决方案将添加新的 Band 并将其拖动到 OUTLINE 窗口中所需的位置。

我是关于 JasperStudio,可能 IReport 不可能

You can drag and drop bands in OUTLINE window.
So solution in "Design View" will be add new Band and Drag it where you want in OUTLINE window.

i am about JasperStudio, may be it was not possible for IReport

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