Ejemplo n.º 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);
        }
Ejemplo n.º 2
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);
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 4
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);
        }