protected void Button1_Click(object sender, EventArgs e)

{


ReportDocument Rpt = new ReportDocument();

//report path in application
string reportPath = Server.MapPath("Reports\\14DaysReport.rpt");

Rpt.Load(reportPath);
CRConnectionInfo connectionInfo = new CRConnectionInfo();

CRConnectionInfo.SetDBLogonForReport(connectionInfo, Rpt);

//Rpt.ExportToHttpResponse(ExportFormatType.PortableDocFormat,
 Response, false, "BiWeeklyReport.pdf");
Rpt.ExportToDisk(ExportFormatType.PortableDocFormat,
 @"C:\BiWeeklyReport.pdf");

string popupScript= "<script language='javascript'>" +
 "window.open('C:/BiWeeklyReport.pdf');</script>" ;

}

Comments ( 0 )