Esempio n. 1
0
        public void OnNavigatedTo(NavigationContext navigationContext)
        {
            int hash = int.Parse(navigationContext.Parameters["DataToDisplay"].ToString());

            dataToDisplay        = (object)AppParameters.Request(hash);
            reportPath           = navigationContext.Parameters["ReportPath"].ToString();
            parameters           = (ReportParameter[])navigationContext.Parameters["Parameters"];
            reportDataSourceName = navigationContext.Parameters["ReportDataSourceName"].ToString();

            if (!_isReportViewerLoaded)
            {
                Microsoft.Reporting.WinForms.ReportDataSource reportDataSource = new
                                                                                 Microsoft.Reporting.WinForms.ReportDataSource();

                reportDataSource.Name = reportDataSourceName;

                reportDataSource.Value = DataToDisplay;
                this.ReportViewerControl.LocalReport.DataSources.Add(reportDataSource);
                this.ReportViewerControl.LocalReport.ReportPath = ReportPath;

                if (parameters != null)
                {
                    this.ReportViewerControl.LocalReport.SetParameters(parameters);
                }
                ReportViewerControl.RefreshReport();
                _isReportViewerLoaded = true;
            }

            menu = new RTIReportWindow();
            menu.PrintButton.Command = printCommand;
            ribbonService.AddRibbonItem(menu, true);
        }
        private void OnShowTagOptionsComplete(Library library, List <PDFDocument> pdf_documents, AnnotationReportOptionsWindow.AnnotationReportOptions annotation_report_options)
        {
            var annotation_report = AsyncAnnotationReportBuilder.BuildReport(library, pdf_documents, annotation_report_options);
            ReportViewerControl report_view_control = new ReportViewerControl(annotation_report);
            string title = String.Format("Annotation report at {0}", DateTime.UtcNow.ToShortTimeString());

            OpenNewWindow(title, Icons.GetAppIcon(Icons.ModulePDFAnnotationReport), true, true, report_view_control);
        }
Esempio n. 3
0
        public static void ExportToTextAndLaunch(PDFDocument pdf_document)
        {
            FeatureTrackingManager.Instance.UseFeature(Features.Document_ExportToText);

            // We have to hack this into an annotation report until we have decided if we want to use the collapsible stuff of annotation report
            StandardFlowDocument flow_document = DoExport(pdf_document);

            AsyncAnnotationReportBuilder.AnnotationReport annotation_report = new AsyncAnnotationReportBuilder.AnnotationReport(flow_document);
            ReportViewerControl report_view_control = new ReportViewerControl(annotation_report);
            string title = String.Format("Text export of PDF titled '{0}'", pdf_document.TitleCombined);

            MainWindowServiceDispatcher.Instance.OpenNewWindow(title, Icons.GetAppIcon(Icons.ExportToText), true, true, report_view_control);
        }
Esempio n. 4
0
 private void Print()
 {
     ReportViewerControl.PrintDialog();
 }