Suresh Babu

Suresh Babu

  • NA
  • 141
  • 19k

crystal report export into pdf

Aug 1 2013 2:56 AM
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)