Report Render is empty
Posted: Wed May 13, 2015 6:12 pm
I have an application, client and server.
I need to return the server template to the client rendering.
Code server:
Code Client:
Report Render is empty
I need to return the server template to the client rendering.
Code server:
Code: Select all
StiReport report= StiReport.GetReportFromAssembly(fileLayoutComped, false);
report.CacheAllData = true;
if (dataSet != null)
{
report.RegData(dataSet);
}
byte[] tReport = report.SaveToByteArray();
report.Dispose();
report= null;
return BinaryUtil.SerializaObjeto(tReport);
Code: Select all
byte[] rReport = (byte[])BinaryUtil.DeserializaObjeto(dicionarioService.GetReport(IdReport, BinaryUtil.SerializaObjeto(ListParameter)));
StiReport report = new StiReport();
report.Load(rReport);
report.Render(false);
StiViewerConfigService previewConfigService = StiConfig.Services.GetService(typeof(StiViewerConfigService)) as StiViewerConfigService;
previewConfigService.PageNewEnabled = false;
previewConfigService.PageDeleteEnabled = false;
previewConfigService.PageDesignEnabled = false;
previewConfigService.PageSizeEnabled = false;
if (Imprimir)
{
report.PrinterSettings.ShowDialog = false;
report.Print(false);
}
else
{
if (Formulario)
report.Show(Sessao.FormPrincipal, true);
else
report.Show(Sessao.formPrincipal);
}