public static void SetParameter(string ParamName, T Value, ref GrapeCity.ActiveReports.Document.PageDocument pageDocument) { ParameterValue value = new ParameterValue(); value.Value = Value; value.Label = "neu"; pageDocument.Parameters[ParamName].ValidValues.Add(value); pageDocument.Parameters[ParamName].Values.Add(value); }
public KontoRepViewer(GrapeCity.ActiveReports.Document.PageDocument doc) { InitializeComponent(); viewer1.LoadCompleted += Viewer1_LoadCompleted; this.FormClosed += KontoRepViewer_FormClosed; this.Load += KontoRepViewer_Load; this.sendMailButton.Click += SendMailButton_Click; this.pdfSimpleButton.Click += PdfSimpleButton_Click; this.excelSimpleButton.Click += ExcelSimpleButton_Click; _doc = doc; _doc.LocateDataSource += new GrapeCity.ActiveReports.LocateDataSourceEventHandler(Doc_LocateDataSource); viewer1.LoadDocument(doc); //viewer1.Sidebar.Visible = true; //viewer1.Sidebar.SelectedIndex = 3; }
void ShowReport() { try { int BelegID = BelID; pageDocument = ActiveReportsTools <int> .GetDocument(StaticMethods.GetPath(Belegname)); pageDocument.LocateDataSource += new LocateDataSourceEventHandler(pageDocument_LocateDataSource); int res = CommonTools.Tools.ConfigEntry <int> .GetConfigEntry("DoPdfExportBelege", "0"); if (res == 1) { string fName = ConfigEntry <string> .GetConfigEntry("BelegePFDExport", @"F:\ALLGEMEIN\EDV\Datenbank_Neu\Export\Belege\"); fName += String.Format("{0}.pdf", BelegvModel.Belegnummer.Trim()); GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport PdfExport1 = new GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport(); PdfExport1.Export(pageDocument, fName); } viewer1.LoadDocument(pageDocument); //LoggingTool.LogMessage("Calling Getdocument", "BelegViewer", "ShowReport", LoggingTool.LogState.low); //pageDocument = ActiveReportsTools<int>.GetDocument(StaticMethods.GetPath(Belegname)); //LoggingTool.LogMessage("Calling LocateDataSource", "BelegViewer", "ShowReport", LoggingTool.LogState.low); //pageDocument.LocateDataSource += new LocateDataSourceEventHandler(pageDocument_LocateDataSource); //LoggingTool.LogMessage("Calling LoadDocument", "BelegViewer", "ShowReport", LoggingTool.LogState.low); //viewer1.LoadDocument(pageDocument); ////LoggingTool.LogMessage("Calling LoadCompleted", "BelegViewer", "ShowReport", LoggingTool.LogState.low); ////viewer1.LoadCompleted += new GrapeCity.ActiveReports.Document.LoadCompletedEventHandler(viewer1_LoadCompleted); //LoggingTool.LogMessage("Done ShowReport", "BelegViewer", "ShowReport", LoggingTool.LogState.low); } catch (System.IO.IOException ex) { ErrorMethods.HandleStandardError(ex); } catch (Exception ex) { ErrorMethods.HandleStandardError(ex); } }
void ShowReport1() { try { int BelegID = BelID; pageDocument = ActiveReportsTools <int> .GetDocument(StaticMethods.GetPath(Belegname)); pageDocument.PageReport.Report.DataSources[0].DataSourceReference = StaticMethods.GetPath("SteinbachSharedDataSource.rdsx"); ActiveReportsTools <int> .SetParameter("BelegID", BelegID, ref pageDocument); viewer1.LoadDocument(pageDocument); viewer1.LoadCompleted += new GrapeCity.ActiveReports.Document.LoadCompletedEventHandler(viewer1_LoadCompleted); } catch (Exception ex) { ErrorMethods.ShowErrorMessageToUser(ex, ""); } }
private void btnEtikett_Click(object sender, RoutedEventArgs e) { pageDocument = ActiveReportsTools <int> .GetDocument(StaticMethods.GetPath(@"Belege\PageReport1.rdlx")); viewer1.LoadDocument(pageDocument); }