【发布时间】:2012-02-15 03:18:06
【问题描述】:
我正在尝试导出报告,但每次运行代码以在 Crystalreportviewer 中导出水晶报告时,我都会收到一条错误消息,提示“缺少参数值”。我查看了许多来源,但没有找到解决方案。我知道所有参数都填好了,因为没有导出代码,网站运行得很好。
导出代码
Try
Dim CrExportOptions As CrystalDecisions.Shared.ExportOptions
Dim CrDiskFileDestinationOptions As New _
CrystalDecisions.Shared.DiskFileDestinationOptions()
Dim CrFormatTypeOptions As New CrystalDecisions.Shared.PdfRtfWordFormatOptions()
CrDiskFileDestinationOptions.DiskFileName = _
"c:\crystalExport.pdf"
CrExportOptions = oRpt.ExportOptions
With CrExportOptions
.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile
.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat
.DestinationOptions = CrDiskFileDestinationOptions
.FormatOptions = CrFormatTypeOptions
End With
oRpt.Export()
Catch ex As Exception
Response.Write(ex.ToString)
End Try
还有:
'Try
' oRpt.ExportToHttpResponse([Shared].ExportFormatType.PortableDocFormat, Response, True, "ExportedReport")
'Catch ex As Exception
' Response.Write(ex.ToString)
'End Try
任何帮助都会很棒。
【问题讨论】:
标签: asp.net vb.net parameters crystal-reports export