Yes, You can Export as PDF File From Crystal Report and Store to Local Disk with your computer.
for that we have to use For Loop Conditional and set the value in it.
For store Report in PDF file we use Export method from Report Control.
Code :
I hope this will help you
for that we have to use For Loop Conditional and set the value in it.
For store Report in PDF file we use Export method from Report Control.
Code :
int i, j = 3885;
for (i = 3880; i <= j; i++)
{
job = new Jobs();
Report = new ReportDocument();
Report.Load(Server.MapPath("~/Reports/CrystalReport.rpt"));
//Report.SetDataSource(job.GetAllInformation(Convert.ToInt32(Session["User"].ToString())));
Report.SetDataSource(job.GetAllInformation(i));
//CrystalReportViewer1.ReportSource = Report;
//CrystalReportViewer1.RefreshReport();
if (File.Exists(@"D:\" + i + "."))
File.Delete(@"D:\" + i + ".");
Report.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, @"D:\" + i + ".");
}
I hope this will help you
0 Comments
Post a Comment