Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
public void DoPDF(System.Web.SessionState.HttpSessionState httpSess, System.Web.HttpRequest httpreq, System.Web.UI.Page httpPage, ref CrystalDecisions.CrystalReports.Engine.ReportDocument myReport) {
HttpResponse httpresp = httpPage.Response;
ExportOptions Export;
DiskFileDestinationOptions tempFileOptions;
string tempFilename;
tempFilename = "c:\\TEMP\\" + httpSess.SessionID.ToString() + ".pdf";
tempFileOptions = new DiskFileDestinationOptions();
tempFileOptions.DiskFileName = tempFilename;
Export = myReport.ExportOptions;
Export.DestinationOptions = tempFileOptions;
Export.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile;
Export.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;
myReport.Export();
httpresp.ClearContent();
httpresp.ClearHeaders();
httpresp.ContentType = "application/pdf";
httpresp.WriteFile(tempFilename);
httpresp.Flush();
httpresp.Close();
System.IO.File.Delete(tempFilename);
}
reporting posteReport = new reporting();
posteReport.DoPDF(Session, Request, Page, ref myReport);