Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Scrollbars or cuts or no charts with various browsers(Problem when viewing a chart with report engine in browsers: charts doesn't appear or does appear cut or with unnecessary scrollbars)
icon5.gif  Scrollbars or cuts or no charts with various browsers [message #640561] Mon, 22 November 2010 13:59 Go to next message
Bluish Joe is currently offline Bluish JoeFriend
Messages: 13
Registered: October 2010
Junior Member
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 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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!
Re: Scrollbars or cuts or no charts with various browsers [message #671551 is a reply to message #640672] Wed, 18 May 2011 09:42 Go to previous messageGo to next message
Bluish Joe is currently offline Bluish JoeFriend
Messages: 13
Registered: October 2010
Junior Member
Thanks Jason, finally I solved my problem.
Re: Scrollbars or cuts or no charts with various browsers [message #671647 is a reply to message #671551] Wed, 18 May 2011 14:46 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

How did you resolve it?

Jason

On 5/18/2011 5:42 AM, bluish wrote:
> Thanks Jason, finally I solved my problem.
Re: Scrollbars or cuts or no charts with various browsers [message #687989 is a reply to message #671551] Thu, 23 June 2011 16:01 Go to previous messageGo to next message
Khaled  is currently offline Khaled Friend
Messages: 2
Registered: June 2011
Junior Member
bluish wrote on Wed, 18 May 2011 05:42
Thanks Jason, finally I solved my problem.


I'm having the same issue ! how did you solve it ?

thanks
Re: Scrollbars or cuts or no charts with various browsers [message #688033 is a reply to message #687989] Thu, 23 June 2011 18:24 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

What supported images are you using?
options.setSupportedImageFormats( "PNG;GIF;JPG;BMP" );

Jason
Re: Scrollbars or cuts or no charts with various browsers [message #688038 is a reply to message #688033] Thu, 23 June 2011 18:30 Go to previous messageGo to next message
Khaled  is currently offline Khaled Friend
Messages: 2
Registered: June 2011
Junior Member
when I use "PNG" i get scrollbars in firefox but not in IE
Re: Scrollbars or cuts or no charts with various browsers [message #688041 is a reply to message #688038] Thu, 23 June 2011 18:36 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Is the chart in a container object like a grid? If so as a test can you put it in the report body by itself?

Jason
Re: Scrollbars or cuts or no charts with various browsers [message #988486 is a reply to message #671647] Fri, 30 November 2012 08:20 Go to previous message
Bluish Joe is currently offline Bluish JoeFriend
Messages: 13
Registered: October 2010
Junior Member
Jason Weathersby wrote on Wed, 18 May 2011 16:46
How did you resolve it?

Jason

On 5/18/2011 5:42 AM, bluish wrote:
> Thanks Jason, finally I solved my problem.


I'm sorry, I haven't been notified of your replies... and now I can't remember how I solved it Sad
Previous Topic:Chart Legend Link to Bookmark fail
Next Topic:Refresh a report
Goto Forum:
  


Current Time: Mon Dec 22 21:19:53 GMT 2014

Powered by FUDForum. Page generated in 0.01917 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software