找回密码
 立即注册

QQ登录

只需一步,快速开始

sanyoumed

初级会员

40

主题

132

帖子

322

积分

初级会员

积分
322

活字格认证微信认证勋章

sanyoumed
初级会员   /  发表于:2016-6-20 15:41  /   查看:2910  /  回复:3
Windows 7.0+visual 2010+vb.net +winforms


如题,谢谢!

3 个回复

倒序浏览
Lenka.Guo讲师达人认证 悬赏达人认证
超级版主   /  发表于:2016-6-20 16:36:06
沙发
本帖最后由 Lenka.Guo 于 2016-6-20 16:40 编辑

您好, 您是想在程序中添加导出PDF 按钮,并实现该功能?

使用VB.NET 语言,基于XML 的区域报表

  1. Dim rpt As New GrapeCity.ActiveReports.SectionReport()
  2. Dim xtr As New System.Xml.XmlTextReader(Application.StartupPath + "\report.rpx")rpt.LoadLayout(xtr)

  3. rpt.Run()
  4. Dim PdfExport1 As New GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport()
  5. PdfExport1.Export(MyDocument, Application.StartupPath + "\PDFExpt.pdf")
复制代码

基于代码的区域报表导出:

  1. Dim sectionReport As New SectionReport1()
  2. sectionReport.Run()

  3. ' Export the report in PDF format.
  4. Dim PdfExport1 As New GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport()
  5. PdfExport1.Export(sectionReport.Document, Application.StartupPath + "\PDFExpt.pdf")

复制代码







评分

参与人数 1满意度 +5 收起 理由
sanyoumed + 5 赞一个!

查看全部评分

回复 使用道具 举报
sanyoumed
初级会员   /  发表于:2016-6-22 09:44:32
板凳
已解决,谢谢!
回复 使用道具 举报
Lenka.Guo讲师达人认证 悬赏达人认证
超级版主   /  发表于:2016-6-22 10:28:29
地板

回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部