Tips for saving large reports?
Hello everyone!
I have a relatively large report that populates a bunch of images from the file system.
After the report is prepared successfully and prints, I want to save a copy of the report to my file system automatically.
For smaller reports this works, but for these larger reports I just get a 0byte file. I believe that it is trying to save the report before the report is officially completed / prepared.
I'm using a using statement for generating the report.
Does anyone have any recommendations for something that would trigger when the report is complete? Or how to know when the report has finished that would be accurate?
I appreciate the help!
Comments
In c# I write big reports int file system, wit this.
MemoryStream resultFile = new MemoryStream();
exportpdf = new PDFExport();
exportpdf.ShowProgress = false;
exportpdf.Compressed = true;
exportpdf.Background = false;
exportpdf.TextInCurves = false;
exportpdf.PrintOptimized = true;
exportpdf.ImagesOriginalResolution = false;
exportpdf.ColorSpace = PDFExport.PdfColorSpace.RGB;
exportpdf.JpegCompression = true;
exportpdf.EmbeddingFonts = true;
FastReport.Utils.Config.ReportSettings.ShowProgress = false;
fastReportObject.Prepare();
fastReportObject.Export(exportpdf, resultFile ); // export fastreport object to pdf
IN THIS POINT YOU HAVE A MEMORYSREAM (resultFile ) WITH DE FILE CONTENT and you can save it to file System.
greetings