We builded our own mail send action. When the user chooses "send mail" from MVCviewer wil go to an action where i want to send the report by mail:
These are the lines supossed to do that:
StiReport reporterenderizado=new StiReport();
reporterenderizado.Load(Server.MapPath("~/Customizado/Reportes/" + reporte));
((StiSqlDatabase)reporterenderizado.Dictionary.Databases["MSSQL1"]).ConnectionString = CadenaConexionCliente.cadenaconexion();//cadena de conexion para la base
reporterenderizado["ParamSolicitud"] = idEntidad;
reporterenderizado.Render();
while (reporterenderizado.IsRendering==true)
{
Thread.Sleep(500);
};
MemoryStream stream = new MemoryStream();
StiPdfExportSettings settings = new StiPdfExportSettings
{
StandardPdfFonts = false
};
StiPdfExportService service = new StiPdfExportService();
Export.Pdf.AllowImportSystemLibraries = true;
service.ExportPdf(reporterenderizado, stream, settings);
System.IO.File.WriteAllBytes("temp.pdf", stream.ToArray());
The problem is that the file TEMP.PDF is not being renderized correctly. It bring wrong data, like the variable "ParamSolicitud" where never setted.
Thanks,
Custoim email action bad render
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: Custoim email action bad render
Hello,
Please send us a sample project that reproduces the issue for analysis.
Thank you.
Please send us a sample project that reproduces the issue for analysis.
Thank you.
Re: Custoim email action bad render
Solved it by replacing this:
StiReport reporterenderizado=new StiReport();
reporterenderizado.Load(Server.MapPath("~/Customizado/Reportes/" + reporte));
((StiSqlDatabase)reporterenderizado.Dictionary.Databases["MSSQL1"]).ConnectionString = CadenaConexionCliente.cadenaconexion();//cadena de conexion para la base
With
StiReport reporterenderizado=StiMvcViewer.GetReportObject();
StiReport reporterenderizado=new StiReport();
reporterenderizado.Load(Server.MapPath("~/Customizado/Reportes/" + reporte));
((StiSqlDatabase)reporterenderizado.Dictionary.Databases["MSSQL1"]).ConnectionString = CadenaConexionCliente.cadenaconexion();//cadena de conexion para la base
With
StiReport reporterenderizado=StiMvcViewer.GetReportObject();
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: Custoim email action bad render
Hello,
Thank you for the information.
Thank you for the information.