Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2057
  • Last Modified:

ExportToDisk in Crystal Report Error!

Hi,
I want to export my report into pdf, word, etc...
My Application is web-based

The command I use is

Protected WithEvents report As CrystalDecisions.CrystalReports.Engine.ReportClass

report = New rptTest

report.ExportToDisk(ExportFormatType.PortableDocFormat, "c:\test.PDF")

Error description is :
Missing parameter field current value.

Can U help me!
Thank you!

0
bufalobk
Asked:
bufalobk
  • 2
1 Solution
 
DabasCommented:
Check that you have CrystalDecisions.Shared as a reference.

Then change your code like this:

       report.ExportToDisk(report.ExportOptions.ExportFormatType.PortableDocFormat, "c:\test.PDF")
0
 
bufalobkAuthor Commented:
I have found the error.
It's not "CrystalDecisions.Shared as a reference" . I included "Import CrystalDecisions.Shared" line at the beginning of code.

The reason is I pass parameter values to the CrystalReportViewer to display data intead of passing to report document.
Parameter must be passed value to report document before export into disk.

Thank you anyway!
0
 
DabasCommented:
bufalobk:
Your welcome.
If you included Import CrystalDecisons.Shared then it means you already had it as a reference.
Since it is obvious that I guided you to the correct solution, the acceptance of my answer will be appreciated.

Dabas
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now