4
Answers

crystal report export into pdf

Suresh Babu

Suresh Babu

11y
2k
1
am trying to export the crystal report into pdf but am getting the follwing error
Logon failed.
Details: ADO Error Code: 0x
Source: Microsoft OLE DB Provider for SQL Server
Description: Login failed for user 'sa'.
SQL State: 42000
Native Error: 

and this is my code

 ReportDocument pdfReport = new ReportDocument();
            BptApplicationPrintrpt bpt = new BptApplicationPrintrpt();
            bpt.Load(Server.MapPath("~/Reports/BptApplicationPrintrpt.rpt"));

       // pdfReport.SetDatabaseLogon("amitjain", "password", @"AMITJAIN\SQL", "Northwind");

        Response.Buffer = false;

        Response.ClearContent();

        Response.ClearHeaders();
        bpt.SetParameterValue("Appno", clsMFields.ApplicationNo);
-->am getting error at this line        bpt.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, "Employees");

        Response.End();
please help me.. please solve my problem

Answers (4)