on 03-18-2024 6:45 PM
This is the error I receive as shown below.
Here is the code used. The report runs fine in the CR viewer, but when I try to export it to a PDF file then I receive the above error.
' Run report
Try
CrystalReportViewer1.ReportSource = objReport
CrystalReportViewer1.Zoom(100)
Catch SqlExceptionErr As SqlException
MessageBox.Show(SqlExceptionErr.Message)
End Try
' Export report to pdf
Try
objReport.ExportToDisk(ExportFormatType.PortableDocFormat, "c:temp\100000026")
Catch ex As Exception
MsgBox(ex.ToString)
End Try
This looks wrong:
"c:temp\100000026")
Should be:
c:\temp\1000000026
You are missing the "\"
Plus you need a file name extension:
rpt.ExportToDisk(ExportFormatType.PortableDocFormat, "c:\temp\1000000026.pdf");
You also need permission to export to C:\temp folder
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
10 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.