Crystal Reports Export Fails

Dear Experts,
When I'm trying to export a Crystal report, it is failing with an Error Database Logon Failed.  Please find the code attached.

Please let me know if Im missing something..

Dim strconn = "Data Source=MUNINSERT2;User ID=isqlprd;Password=sysinsert;Initial Catalog=insertsystem"
        Dim sqlconn As New SqlConnection(strconn)
        Dim ds As New DataSet()
        Dim param As SqlParameter
        Dim cmdDisclaimer As New SqlCommand("WorkOrderDisclaimersMedlineXML", sqlconn)
        cmdDisclaimer.Connection = sqlconn
        cmdDisclaimer.CommandType = CommandType.StoredProcedure
        param = cmdDisclaimer.Parameters.Add(New SqlParameter("@WorkOrderID", System.Data.SqlDbType.VarChar, 10))
        param.Direction = System.Data.ParameterDirection.Input
        param.Value = "6665470"
        Dim daMedline As New SqlDataAdapter(cmdDisclaimer)
        daMedline.SelectCommand = cmdDisclaimer

        daMedline.Fill(dsMedlineDisclaimer, "dtMedlineDisclaimerDetails")
        'Close connection
            Dim CR As New ReportDocument

            CR.SetDatabaseLogon("isqlprd", "sysinsert", "MUNINSERT2", "insertsystem")

            'Dim ExportOptions As New CrystalDecisions.Shared.ExportOptions()
            'Dim DiskFileDestinationOptions As CrystalDecisions.Shared.DiskFileDestinationOptions
            'DiskFileDestinationOptions = CrystalDecisions.Shared.ExportOptions.CreateDiskFileDestinationOptions()
            'ExportOptions.ExportFormatType = ExportFormatType.CrystalReport
            'ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
            'DiskFileDestinationOptions.DiskFileName = "\\muninsert2\EDrive\SPT\InsertSystem\PrintQueue\CrystalReport1.rpt"
            'ExportOptions.ExportDestinationOptions = DiskFileDestinationOptions

            CR.ExportToDisk(ExportFormatType.PortableDocFormat, "\\muninsert3\EDrive\SPT\InsertSystem\PrintQueue\Insert8x11.rpt")
            CrystalReportViewer1.ReportSource = CR

        Catch ex As Exception
        End Try

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Are there any subreports?
sivamanAuthor Commented:
No, there are no subreports. The report which Im loading is a report which is migrated from CR 4.0 to CR 2008.
sivamanAuthor Commented:
Please find attached the screen shot of the Error message .  Crystal-Reports-Export-Error.docx
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Do you have more than 1 table in the report?
If so sometimes you have to loop through the tables and apply the logon information

sivamanAuthor Commented:
I'm able to export the reports. The report data source wasnt pointing to the right source.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.