Scrollbars or cuts or no charts with various browsers [message #640561] |
Mon, 22 November 2010 13:59 |
|
Hello! I've just encountered an odd problem with visualization of charts.
This is the code in my Java servlet class that runs the report:
this.birtReportEngine = BirtEngine.getBirtEngine(sc);
IReportRunnable design;
try
{
design = birtReportEngine.openReportDesign( reportPathName );
//create task to run and render report
IRunAndRenderTask task = birtReportEngine.createRunAndRenderTask( design );
// SET PARAMETERS
task.setParameterValue("Years", numOfYears);
task.setParameterValue("Agent", usercode);
//set output options
HTMLRenderOption options = new HTMLRenderOption();
options.setImageHandler( new HTMLServerImageHandler() );
options.setImageDirectory( sc.getRealPath("/images"));
options.setBaseImageURL( req.getContextPath() + "/images" );
options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML);
options.setEmbeddable(true);
options.setOutputStream(resp.getOutputStream());
task.setRenderOption(options);
//run report
task.run();
task.close();
}catch (Exception e){
System.out.println("DynamicReport: error " + e.getMessage());
e.printStackTrace();
throw new ServletException( e );
}
Our problem is that, when report is printed on the HTML page, charts take a strange behaviour: often (not always!) they appear with scrollbars, even if they aren't necessary, or they appear with the bottom and right parts cut...
This occurs running it in Firefox.
With Internet Explorer the result it's even worse: charts doesn't appear at all...
Someone has an hint? Maybe could be the embeddable property that causes so?
Many thanks!
|
|
|
Re: Scrollbars or cuts or no charts with various browsers [message #640672 is a reply to message #640561] |
Mon, 22 November 2010 18:37 |
|
What output format are you using for the charts? Are they set to SVG?
Are you setting the supported image formats in the options?
options.setSupportedImageFormats( "PNG;GIF;JPG;BMP" );
Jason
On 11/22/2010 8:59 AM, bluish wrote:
> Hello! I've just encountered an odd problem with visualization of charts.
> This is the code in my Java servlet class that runs the report:
>
> this.birtReportEngine = BirtEngine.getBirtEngine(sc);
> IReportRunnable design;
>
> try
> {
> design = birtReportEngine.openReportDesign( reportPathName );
>
> //create task to run and render report
> IRunAndRenderTask task = birtReportEngine.createRunAndRenderTask( design );
>
> // SET PARAMETERS
> task.setParameterValue("Years", numOfYears);
> task.setParameterValue("Agent", usercode);
>
> //set output options
> HTMLRenderOption options = new HTMLRenderOption();
> options.setImageHandler( new HTMLServerImageHandler() );
> options.setImageDirectory( sc.getRealPath("/images"));
> options.setBaseImageURL( req.getContextPath() + "/images" );
> options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML) ;
> options.setEmbeddable(true);
> options.setOutputStream(resp.getOutputStream());
> task.setRenderOption(options);
> //run report
> task.run();
> task.close();
> }catch (Exception e){
> System.out.println("DynamicReport: error " + e.getMessage());
> e.printStackTrace();
> throw new ServletException( e );
> }
>
> Our problem is that, when report is printed on the HTML page, charts
> take a strange behaviour: often (not always!) they appear with
> scrollbars, even if they aren't necessary, or they appear with the
> bottom and right parts cut...
> This occurs running it in Firefox.
> With Internet Explorer the result it's even worse: charts doesn't appear
> at all...
>
> Someone has an hint? Maybe could be the embeddable property that causes so?
> Many thanks!
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02742 seconds