Java 每当报表阶段关闭时,主阶段将关闭

Java 每当报表阶段关闭时,主阶段将关闭,java,javafx-2,dynamic-reports,Java,Javafx 2,Dynamic Reports,在我的javafx应用程序中,我使用的是DynamicReports,这是一个免费的开源Java报告工具。在buttons事件的代码中,我调用了一个方法来显示报告: report1.setOnAction(event -> { getSupplierListReport(); } ); 这就是方法: public void getSupplierListReport() {

在我的javafx应用程序中,我使用的是DynamicReports,这是一个免费的开源Java报告工具。在buttons事件的代码中,我调用了一个方法来显示报告:

report1.setOnAction(event -> {

                    getSupplierListReport();

                }

        );
这就是方法:

public void getSupplierListReport()
    {

        report = DynamicReports.report();


        try {
            //show the report


            report
                    .columns(
                            Columns.reportRowNumberColumn("No"),
                            Columns.column("First Name", "f_name", DataTypes.stringType()),
                            Columns.column("Last Name", "l_name", DataTypes.stringType()),
                            Columns.column("Email", "email", DataTypes.stringType())

                    )
                    .title(//title of the report
                            Components.text("Supplier List Report")
                                    .setHorizontalAlignment(HorizontalAlignment.CENTER).setStyle(boldCenteredStyle))
                    .pageFooter(Components.pageXofY().setStyle(boldCenteredStyle))//show page number on the page footer
                    .highlightDetailEvenRows()
                    .setColumnTitleStyle(columnTitleStyle)
                    .setDataSource("SELECT f_name, l_name, email FROM suppliers", connection)
                    .show();
            //export the report to a pdf file
            report.toPdf(new FileOutputStream("d:/report.pdf"));

        } catch (DRException e) {
            e.printStackTrace();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }


    }

报告生成正确,没有错误。我的想法是,当我关闭主窗口时,报告窗口不会变冷,这是正常的,但每当我关闭报告窗口时,它就会关闭整个应用程序!!!可能是动态报告工具关闭功能触发关闭整个应用程序。如何克服这个问题???

如果我在show方法中传递参数false,它似乎不会关闭应用程序

.show(false);