logon error while exporting crystal report
iam having problem exporting the crystal report from my .aspx page.
first iam displaying the crystal report in .aspx page.from tha t page iam exporting it to a pdf file.i have provided a button to export the report to a pdf file.
the problem is coming in exporting the report to pdf file
iam getting logon error i.e
CrystalDecisions.CrystalReports.Engine.LogOnExcept ion: Logon failed.
the code for export button is
Dim myReport As New Employee()
Dim strExportFile As String
Dim objExOpt As ExportOptions
Dim objDiskOpt As New DiskFileDestinationOptions()
strExportFile = "c:\jobs4hunt.pdf"
objDiskOpt.DiskFileName = Server.MapPath(".") & "/export/" & strExportFile
objExOpt = myReport.ExportOptions
objExOpt.ExportDestinationType = ExportDestinationType.DiskFile
objExOpt.ExportFormatType = ExportFormatType.PortableDocFormat
objExOpt.DestinationOptions = objDiskOpt
myReport.Export()
myReport.Close()
any idea what is wrong.help me out.
|