Quantcast
Channel: Crystal Reports
Viewing all articles
Browse latest Browse all 1507

Error System.Runtime.InteropServices.COMException: Database logon failed.

$
0
0

Hello,

I am working with Crystal Reports in VS 2010.  I am trying to create a PDF directly.  Another caveat is that I am using a datatable that is only used when creating this report.

Below is my code.  If you need anything else, let me know.

        Dim crChecklist As New ReportDocument
        Dim strReportName As String

        Dim myDs = New DataSet
        Dim myDt = myDs.Tables("Checklist")

        myDt = CType(Session("myDatatable"), DataTable)



        strReportName = Server.MapPath("~/Reports/") & Replace(txtName.Text, " ", "_") & ".pdf"

        crChecklist.Load(Server.MapPath("~/crChecklist.rpt"))

        crChecklist.SetDataSource(myDs.Tables("Checklist"))

        crChecklist.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, True, strReportName)

        crChecklist.SetParameterValue("pUserName", txtName.Text)
        crChecklist.SetParameterValue("pUserPicture", lblPictureFileName.Text)

The error is comoing on the crChecklist.ExportToHttpResponse .....

Thanks for your help in advance!!

Eddi Rae


Viewing all articles
Browse latest Browse all 1507

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>