Iam Using This Code For Crystal Report (Pdf Download ) Without ReportViewer. Its Working But
I need To Set Local Parameeters For This Report. I Tryed But Showing Error
Missing Parameter Values
ReportDocument reportDocument = new ReportDocument();
Reports.dsIssueFilter dsCITReport = new Reports.dsIssueFilter();
reportDocument.Load(Server.MapPath("~/WebForms/Reports/CrystalReport1.rpt"));
string reportPath = string.Empty;
if (!string.IsNullOrEmpty(ConfigurationManager.AppSettings["ReportsPDFPath"]))
{
reportPath = ConfigurationManager.AppSettings["ReportsPDFPath"].ToString();
}
dsCITReport.Tables["spFilterIssueDetailForReport"].Merge(dtRptData.Tables[0]); //Set Data
reportDocument.SetDataSource(dsCITReport);
string reporFullPath = reportPath + ".pdf";
if (reportDocument.IsLoaded)
{
reportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, Server.MapPath(reporFullPath));
Response.ContentType = "Application/pdf";
Response.AppendHeader("Content-Disposition", "attachment; filename=RequestForm.pdf");
Response.TransmitFile(Server.MapPath(reporFullPath));
Response.End();
}
SomeOne Can Give me Details For This
Amit GuptaPosted Feb 20, 2017, 1:29 PM