i've found this problem: i have simple report with header, which contains
one grid. Grid has set visibility like this:
reportContext.getAppContext().get("XX")==null
The grid should not render when the context parameter is set. When i run
this report using report viewer in PDF, the grid is not there, thats ok.
When i run it using Engine API, it renders, Here is my code which i use to
set rendering options:
RenderOption renderOption = null;
if(format.equals(ReportingEngine.PDF)) {
renderOption = new PDFRenderOption( );
renderOption.setOption( IPDFRenderOption.PAGE_OVERFLOW, new Integer(
IPDFRenderOption.OUTPUT_TO_MULTIPLE_PAGES ) );
renderOption.setOption( IPDFRenderOption.PAGEBREAK_PAGINATION_ONLY,
Boolean.TRUE );
} else {
renderOption = new HTMLRenderOption( );
((HTMLRenderOption)renderOption).setEnableAgentStyleEngine(true);
}
renderOption.setSupportedImageFormats("PNG;GIF;JPG;BMP;SWF" );
// If not excel format, set HTMLPagination to true.
if ( !format.equals( ReportingEngine.XLS ) ) {
((IRenderOption) renderOption ).setOption(
IRenderOption.HTML_PAGINATION, Boolean.TRUE );
}
renderOption.setOption( IHTMLRenderOption.HTML_RTL_FLAG, new
Boolean(false) );
renderOption.setOption( IHTMLRenderOption.MASTER_PAGE_CONTENT, new
Boolean( true ) );
renderOption.setOutputStream(out);
renderOption.setOutputFormat(format);
task.setLocale(ULocale.forLocale(Constants.DEFAULT_LOCALE));
task.setRenderOption(renderOption);
task.render();
task.close();
reportDocument.close();
is there something im missing, and not settting to render options, while
report viewer sets that something?