这个网格变量从哪里来?

发布于 2024-12-02 20:00:38 字数 964 浏览 3 评论 0原文

我正在查看 DynamicReports 的 ColumnGridReport 示例

我想使用经典的代码语法而不是示例中使用的 DSL,这意味着创建

JasperReportBuilder report = DynamicReports.report();

和使用 report.addColumn(...) 等等,但我不知道如何对“columnGrid”部分执行此操作:

          report
          .columnGrid(   
            grid.verticalColumnGridList(   
                itemColumn,   
                grid.horizontalColumnGridList(quantityColumn,   unitPriceColumn)),   
            grid.verticalColumnGridList(   
                orderDateColumn,   
                grid.horizontalColumnGridList(orderDateFColumn, orderYearColumn),   
                grid.horizontalColumnGridList(orderMonthColumn, orderDayColumn)));

有一个变量grid ...它是在哪里初始化的?

基本上我想做report.columnGrid(如何初始化内部部分)

我怎样才能将其转换为经典语法?

I am looking at the ColumnGridReport example for DynamicReports.

I would like to use the classic code syntax instead of the DSL used in the example, meaning creating

JasperReportBuilder report = DynamicReports.report();

and using report.addColumn(...) and so on, but I can't figure out how to do that for the "columnGrid" part:

          report
          .columnGrid(   
            grid.verticalColumnGridList(   
                itemColumn,   
                grid.horizontalColumnGridList(quantityColumn,   unitPriceColumn)),   
            grid.verticalColumnGridList(   
                orderDateColumn,   
                grid.horizontalColumnGridList(orderDateFColumn, orderYearColumn),   
                grid.horizontalColumnGridList(orderMonthColumn, orderDayColumn)));

There is a variable grid ... where is that even initialized?

Basically I would like to do report.columnGrid(how to initialize the inside part).

How can I transform this to the classic syntax?

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

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

发布评论

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

评论(2

静谧 2024-12-09 20:00:38

文件中有一个静态导入:

import static net.sf.dynamicreports.report.builder.DynamicReports.*;  

正如您在 中看到的那样在这个Javadoc文档中,gridDynamicReports中的一个静态字段。

There's one static import in the file:

import static net.sf.dynamicreports.report.builder.DynamicReports.*;  

As you can see in this Javadoc documentation, grid is a static field in DynamicReports.

蓝梦月影 2024-12-09 20:00:38

您可以像这样导入“网格”

import static net.sf.dynamicreports.report.builder.DynamicReports.grid;

You can import "grid" like this

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