コード例 #1
0
        public override void Run()
        {
            reportStructure = new ReportStructure();
            customizer.Set("Generator", reportStructure);
            customizer.Set("ReportLayout", GlobalEnums.ReportLayout.ListLayout);

            if (GlobalValues.IsValidPrinter() == true)
            {
                using (WizardDialog wizard = new WizardDialog("Report Wizard", customizer, WizardPath)) {
                    if (wizard.ShowDialog() == DialogResult.OK)
                    {
                        reportModel = reportStructure.CreateAndFillReportModel();
                        CreateReportFromModel(reportModel);
                    }
                    else
                    {
                        this.canceled = true;
                    }
                }
            }
            else
            {
                MessageService.ShowError(ResourceService.GetString("Sharpreport.Error.NoPrinter"));
            }
        }