コード例 #1
0
        public void ShowPreview()
        {
            if (_columns.Count == 0)
            {
                MessageBox.Show(this, Resources.PivotReportDlg_ShowPreview_A_report_must_have_at_least_one_column_, Program.Name);
                return;
            }

            Report           report           = GetReport();
            ResultSet        resultSet        = report.Execute(_database);
            PreviewReportDlg previewReportDlg = new PreviewReportDlg();

            previewReportDlg.SetResults(resultSet);
            previewReportDlg.Show(Owner);
        }
コード例 #2
0
ファイル: ExportReportDlg.cs プロジェクト: rfellers/pwiz
        public void ShowPreview()
        {
            try
            {
                var database = GetDatabase(this);
                // If database is null, than loading must have been cancelled.
                if (database == null)
                {
                    return;
                }

                PreviewReportDlg previewReportDlg = new PreviewReportDlg();
                previewReportDlg.SetResults(GetReport().Execute(database));
                previewReportDlg.Show(Owner);
            }
            catch (Exception x)
            {
                string message      = GetExceptionDisplayMessage(x);
                string errorMessage = TextUtil.LineSeparate(
                    string.Format(Resources.ExportReportDlg_ShowPreview_An_unexpected_error_occurred_attempting_to_display_the_report___0___, listboxReports.SelectedItem),
                    message);
                MessageBox.Show(this, errorMessage, Program.Name);
            }
        }
コード例 #3
0
        public void ShowPreview()
        {
            try
            {
                var database = GetDatabase(this);
                // If database is null, than loading must have been cancelled.
                if (database == null)
                    return;

                PreviewReportDlg previewReportDlg = new PreviewReportDlg();
                previewReportDlg.SetResults(GetReport().Execute(database));
                previewReportDlg.Show(Owner);
            }
            catch (Exception x)
            {
                string message = GetExceptionDisplayMessage(x);
                string errorMessage = TextUtil.LineSeparate(
                    string.Format(Resources.ExportReportDlg_ShowPreview_An_unexpected_error_occurred_attempting_to_display_the_report___0___,listboxReports.SelectedItem),
                    message);
                MessageBox.Show(this, errorMessage, Program.Name);
            }
        }
コード例 #4
0
ファイル: PivotReportDlg.cs プロジェクト: lgatto/proteowizard
        public void ShowPreview()
        {
            if (_columns.Count == 0)
            {
                MessageBox.Show(this, Resources.PivotReportDlg_ShowPreview_A_report_must_have_at_least_one_column_, Program.Name);
                return;
            }

            Report report = GetReport();
            ResultSet resultSet = report.Execute(_database);
            PreviewReportDlg previewReportDlg = new PreviewReportDlg();
            previewReportDlg.SetResults(resultSet);
            previewReportDlg.Show(Owner);
        }