Hello!
I have a code snipplet to create a pdf and send by mail.. but got OutOfMemory when I try to render...
Here's the code:
Any other way I can create this Report?
Thanks!
I have a code snipplet to create a pdf and send by mail.. but got OutOfMemory when I try to render...
Here's the code:
string strNomeAnexo = prefixoAnexo.ToString() + ".pdf"; Assembly assReport = Assembly.Load("CentralPaulista.Report"); object objReport = assReport.CreateInstance(strRelatorio); if (strNomeParametro.Count > 0) { strNomeAnexo = prefixoAnexo + strParametro[0] + ".pdf"; int intCont = 0; foreach (string parametro in strNomeParametro) { (objReport.GetType().GetProperty("ReportParameters").GetValue(objReport, null) as ReportParameterCollection)[parametro].Value = strParametro[intCont]; intCont++; } } IReportDocument objDoc = (IReportDocument)objReport; ReportProcessor processor = new ReportProcessor(); RenderingResult result = processor.RenderReport("PDF", objDoc, null); //Here's the Exception MemoryStream arquivo = new MemoryStream(result.DocumentBytes, true);Any other way I can create this Report?
Thanks!