本帖最后由 Lenka.Guo 于 2016-6-20 16:40 编辑
您好, 您是想在程序中添加导出PDF 按钮,并实现该功能?
使用VB.NET 语言,基于XML 的区域报表
- Dim rpt As New GrapeCity.ActiveReports.SectionReport()
- Dim xtr As New System.Xml.XmlTextReader(Application.StartupPath + "\report.rpx")rpt.LoadLayout(xtr)
- rpt.Run()
- Dim PdfExport1 As New GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport()
- PdfExport1.Export(MyDocument, Application.StartupPath + "\PDFExpt.pdf")
复制代码
基于代码的区域报表导出:
- Dim sectionReport As New SectionReport1()
- sectionReport.Run()
- ' Export the report in PDF format.
- Dim PdfExport1 As New GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport()
- PdfExport1.Export(sectionReport.Document, Application.StartupPath + "\PDFExpt.pdf")
复制代码
|