从VB.Net中的Crystal Report扩展到HTML [英] Exoprt to HTML from Crystal Report in VB.Net

查看:70
本文介绍了从VB.Net中的Crystal Report扩展到HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,



我正在尝试将Crystal Report中的数据导出为HTML,但无法在VB.Net中完成相同的操作。



Dear Friends,

I am trying to export the data in Crystal Report to HTML but not able to accomplish the same in VB.Net.

 Dim crDiskFileDestinationOptions As New DiskFileDestinationOptions()
 Dim rptRepDocument As New ReportDocument
 Dim conInfo As New ConnectionInfo

rptRepDocument.RecordSelectionFormula = strSelection

mstrExportFilePath = AppTmpPath & "\tmp\" & docno & ".html"
crDiskFileDestinationOptions.DiskFileName = mstrExportFilePath
crExportOptions = rptRepDocument.ExportOptions
With crExportOptions
    .DestinationOptions = crDiskFileDestinationOptions
    .ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile
    .ExportFormatType = CrystalDecisions.Shared.ExportFormatType.HTML40
End With

rptRepDocument.Export()       





当代码到达 rptRepDocument.Export()时,会出现错误: -



对象引用没有设置为对象的实例。



上面编写的代码不是完整的代码,而是出现错误的代码。



请帮我解决这个问题。



问候



Varun Sareen



When the code reaches the rptRepDocument.Export() then an error occurs saying:-

"Object reference not set to an instance of an object."

The above written code is not the full code but the code where error is coming.

Kindly help me resolve this.

Regards

Varun Sareen

推荐答案

没有看到完整的代码,很难发现问题。请查看以下链接&确保不会丢失任何内容。

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

从Crystal Reports导出为PDF,Word,Excel和HTML [ ^ ]
Without seeing full code it's tough to spot the issue. Check the below link & make sure not missing anything.
VB.NET Crystal Reports Export to PDF[^]
Exporting from Crystal Reports to PDF, Word, Excel and HTML[^]


这篇关于从VB.Net中的Crystal Report扩展到HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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