将水晶报告导出为pdf [英] export crystal report into pdf

查看:160
本文介绍了将水晶报告导出为pdf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下代码在vb.net项目中打开一个新的Word文档

I am using the below code to open a new word document in my vb.net Project

Dim oWord As Word.Application
       Dim oDoc As Word.Document
oWord = CreateObject("Word.Application")
           oWord.Visible = True




这段代码可以用Word打开一个新的Word文档,然后进行必要的更改然后保存.类似地,我可以在按钮中单击




This code open a new word document in word and then i make necessary changes and then save it.Similerly can i export a pdf document in th button click

推荐答案

VB.NET Crystal Reports导出为PDF [ iTextSharp [ ^ ]
VB.NET Crystal Reports Export to PDF[^]

EDIT

Use iTextSharp[^]


这很容易:您要做的就是获取crystalreport对象的新实例

昏暗的rpt作为新的CrystalReport1


设置必要的属性,例如数据源,SelectionFormula等.
然后按如下所示调用Export方法:

rpt.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat,"Report.pdf ")
It''s quite easy: all you have to do is get a new instance of a crystalreport object

Dim rpt as new CrystalReport1


Set the necessary properties, like datasource, SelectionFormula, etc.
Then call the Export method as follows:

rpt.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, "Report.pdf")


这篇关于将水晶报告导出为pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆