Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Image(chart) not display in HTML report(I am trying to generate report on server machine, and accessing it through web-service on client machine.)
Image(chart) not display in HTML report [message #789589] Fri, 03 February 2012 06:39 Go to next message
Deepali Patil is currently offline Deepali PatilFriend
Messages: 22
Registered: January 2012
Junior Member
Hi,

I am trying to generate report on server machine, and accessing it through web-service on client machine.

Through web-service I give call to the code which generate and returns report as a file, I save this file on my machine and use it further. When I choose HTML format; report generates HTML file with temp folder for .svg images, when I pull the report file(HTML)on my machine, the temp folder is still on server machine and it tries to find image source on my machine. If I open same HTML report on server it shows the chart.
I am trying to set ImageDirectory and BaseImageURL but its not working.

Please help me resolve the issue.

Thanks,
Deepali.
Re: Image(chart) not display in HTML report [message #790009 is a reply to message #789589] Fri, 03 February 2012 17:41 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Are you setting the BaseImageURL to point back to the server where the
image resides?

Jason

On 2/3/2012 1:39 AM, Deepali Patil wrote:
> Hi,
>
> I am trying to generate report on server machine, and accessing it
> through web-service on client machine.
>
> Through web-service I give call to the code which generate and returns
> report as a file, I save this file on my machine and use it further.
> When I choose HTML format; report generates HTML file with temp folder
> for .svg images, when I pull the report file(HTML)on my machine, the
> temp folder is still on server machine and it tries to find image source
> on my machine. If I open same HTML report on server it shows the chart.
> I am trying to set ImageDirectory and BaseImageURL but its not working.
>
> Please help me resolve the issue.
>
> Thanks,
> Deepali.
Re: Image(chart) not display in HTML report [message #791668 is a reply to message #790009] Mon, 06 February 2012 05:30 Go to previous messageGo to next message
Deepali Patil is currently offline Deepali PatilFriend
Messages: 22
Registered: January 2012
Junior Member
Hi,

Thanks for your quick reply.

Below is my code that I have used to set image directory and imageURL for HTML report,
I have shared BIRTImages folder on server machine(Linux)

final RenderOption options = getRenderOptions(outputFormat);
if("html".equalsIgnoreCase(outputFormat)) {
((HTMLRenderOption) options).setImageDirectory("\\\\192.168.1.254\BIRTImages");
options.setImageHandler(new HTMLServerImageHandler());
((HTMLRenderOption) options).setBaseImageURL("file://///192.168.1.254/BIRTImages");
}

above code is working fine with windows machine, but when same code I tried on linux machine it's not showing chart image. And gives belows error...

6 Feb, 2012 9:51:17 AM org.eclipse.birt.report.engine.api.impl.Image writeImage
SEVERE: /192.168.1.254/BIRTImages/customba86ef13550e4e3c31.svg (No such file or directory)
java.io.FileNotFoundException: /192.168.1.254/BIRTImages/customba86ef13550e4e3c31.svg (No such file or directory)

Please suggest me something which will work on both windows and linux machine.

Thanks,
Deepali.
Re: Image(chart) not display in HTML report [message #792348 is a reply to message #791668] Mon, 06 February 2012 22:44 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

if you open explored on the client machine and put in:
file://///192.168.1.254/BIRTImages
Does it open the share on the linux box? Are you using SAMBA on the
Linux box? Another option would be to setup tomcat on Linux and make
the url in a web context.

Jason

On 2/6/2012 12:30 AM, Deepali Patil wrote:
> Hi,
>
> Thanks for your quick reply.
>
> Below is my code that I have used to set image directory and imageURL
> for HTML report,
> I have shared BIRTImages folder on server machine(Linux)
> final RenderOption options = getRenderOptions(outputFormat);
> if("html".equalsIgnoreCase(outputFormat)) {
> ((HTMLRenderOption)
> options).setImageDirectory("\\\\192.168.1.254\BIRTImages");
> options.setImageHandler(new HTMLServerImageHandler());
> ((HTMLRenderOption)
> options).setBaseImageURL("file://///192.168.1.254/BIRTImages");
> }
>
> above code is working fine with windows machine, but when same code I
> tried on linux machine it's not showing chart image. And gives belows
> error...
>
> 6 Feb, 2012 9:51:17 AM org.eclipse.birt.report.engine.api.impl.Image
> writeImage
> SEVERE: /192.168.1.254/BIRTImages/customba86ef13550e4e3c31.svg (No such
> file or directory)
> java.io.FileNotFoundException:
> /192.168.1.254/BIRTImages/customba86ef13550e4e3c31.svg (No such file or
> directory)
>
> Please suggest me something which will work on both windows and linux
> machine.
>
> Thanks,
> Deepali.
Re: Image(chart) not display in HTML report [message #792808 is a reply to message #792348] Tue, 07 February 2012 12:39 Go to previous messageGo to next message
Deepali Patil is currently offline Deepali PatilFriend
Messages: 22
Registered: January 2012
Junior Member
Hi,

Thank you very much for quick reply.

I tried to make image URL in tomcat by placing context path in tomcat/conf/server.xml inside the <Host> tag as below
<Context path="/images" docBase="/home/developer/images" />

It gives the error - resource not found /images.

I am using samba on linux machine (server machine).
If I explored file://///192.168.1.254/BIRTImages on client(windows) machine it gives list of images in browser. Same I tried in linux machine it gives me error url not found.

On linux First I mount the share folder and use the URL- file:///home/developer/.gvfs/BIRTImages on 192.168.1.254
It gives the list of images in browser.

Please suggest me something which will work on both windows and linux
As suggest by you I tried to make image url. That doesn't work.
Please tell me where I am going wrong.


Thanks,
Deepali.
Re: Image(chart) not display in HTML report [message #793191 is a reply to message #792808] Tue, 07 February 2012 21:32 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

If you do this:


I tried to make image URL in tomcat by placing context path in
tomcat/conf/server.xml inside the <Host> tag as below
<Context path="/images" docBase="/home/developer/images" />

and enter a url in a browser to http://server:port/images does it show
the list of images in the browser. If it does change your baseURL to be
http://server:port/images

Jason

On 2/7/2012 7:39 AM, Deepali Patil wrote:
>
> I tried to make image URL in tomcat by placing context path in
> tomcat/conf/server.xml inside the <Host> tag as below
> <Context path="/images" docBase="/home/developer/images" />
Re: Image(chart) not display in HTML report [message #793422 is a reply to message #793191] Wed, 08 February 2012 05:30 Go to previous messageGo to next message
Deepali Patil is currently offline Deepali PatilFriend
Messages: 22
Registered: January 2012
Junior Member
Hi,

If I enter url http://server:port/images/ in the browser it gives me following error.

HTTP Status 404 - /images/
type Status report
message /images/
description The requested resource (/images/) is not available.
Apache Tomcat/7.0.19


Please guide.

Thanks,
Deepali.
Re: Image(chart) not display in HTML report [message #793847 is a reply to message #793422] Wed, 08 February 2012 16:45 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Add the image name to the end of the url ie:
<Context path="/images" docBase="c:/test7/" />
http://localhost:8090/images/cc1.png
If this works you should be able to change the baseURL in the engine and
get it working.

Jason


On 2/8/2012 12:30 AM, Deepali Patil wrote:
> Hi,
>
> If I enter url http://server:port/images/ in the browser it gives me
> following error.
>
> HTTP Status 404 - /images/
> type Status report
> message /images/
> description The requested resource (/images/) is not available.
> Apache Tomcat/7.0.19
>
>
> Please guide.
>
> Thanks,
> Deepali.
Re: Image(chart) not display in HTML report [message #794459 is a reply to message #793847] Thu, 09 February 2012 10:14 Go to previous messageGo to next message
Deepali Patil is currently offline Deepali PatilFriend
Messages: 22
Registered: January 2012
Junior Member
Hi,

Thanks for your guidance. The solution suggested by you has worked.
I have one more query can we display chart in the excel format.

Thanks,
Deepali.
Re: Image(chart) not display in HTML report [message #794805 is a reply to message #794459] Thu, 09 February 2012 18:13 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

The default xls emitter does not support images. You could look at
using the tribix xls emitter or
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1421-native-excel-emitter-plugin-for-birt/

Jason


On 2/9/2012 5:14 AM, Deepali Patil wrote:
> Hi,
>
> Thanks for your guidance. The solution suggested by you has worked.
> I have one more query can we display chart in the excel format.
>
> Thanks,
> Deepali.
Re: Image(chart) not display in HTML report [message #795297 is a reply to message #794805] Fri, 10 February 2012 09:53 Go to previous messageGo to next message
Deepali Patil is currently offline Deepali PatilFriend
Messages: 22
Registered: January 2012
Junior Member
Hi,

Thank you very much.
All your suggestion worked for me,
native-excel-plugin also worked fine, similarly is there any plugin for doc and ppt format.

Thanks,
Deepali.
Re: Image(chart) not display in HTML report [message #795550 is a reply to message #795297] Fri, 10 February 2012 15:48 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

The tribix emitters handle ppt and doc I believe.

Jason

On 2/10/2012 4:53 AM, Deepali Patil wrote:
> Hi,
>
> Thank you very much.
> All your suggestion worked for me,
> native-excel-plugin also worked fine, similarly is there any plugin for
> doc and ppt format.
>
> Thanks,
> Deepali.
Re: Image(chart) not display in HTML report [message #798103 is a reply to message #795550] Tue, 14 February 2012 08:59 Go to previous messageGo to next message
Deepali Patil is currently offline Deepali PatilFriend
Messages: 22
Registered: January 2012
Junior Member
Hi,

I have one more problem. On linux machine report in doc and ppt format looks like xml tags. I download tribix jars, but dont know how to use it in the code.

I have gone through this page
http://www.eclipse.org/forums/index.php/m/635978/?srch=birt+doc#msg_635978
on this page you have suggest to remove following plugins

org.eclipse.birt.report.engine.emitter.prototype.excel_2.6.1 .v20100812
org.eclipse.birt.report.engine.emitter.excel.config_2.6.1.v2 0100812
org.eclipse.birt.report.engine.emitter.ppt.config_2.6.1.v201 00812
org.eclipse.birt.report.engine.emitter.ppt_2.6.1.v20100909

I am using jars of 3.7.1 version in that above jars are not available.
Please help me on this topic
When I open report.doc it looks like below,


<?xml version="1.0" encoding="UTF-8"?>
<?mso-application progid="Word.Document"?>
<w:wordDocument xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xml:space="preserve">
<o:DocumentProperties>


I tested same code on linux fedora and linux mint, on both machine got the same output with xml tags,
Please suggest me something.


Thanks,
Deepali.

[Updated on: Tue, 14 February 2012 09:01]

Report message to a moderator

Re: Image(chart) not display in HTML report [message #798436 is a reply to message #798103] Tue, 14 February 2012 17:40 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

They are suppose to be xml. That is the Word XML format. If you want
to use the Tribix emitter in 3.7. take a look at this post:
http://birtworld.blogspot.com/2011/07/replacing-default-birt-xls-emitter.html

Jason

On 2/14/2012 3:59 AM, Deepali Patil wrote:
> Hi,
>
> I have one problem. On linux machine report in doc and ppt format looks
> like xml tags. I download tribix jars, but dont know how to use it in
> the code.
>
> I have gone through this page
> http://www.eclipse.org/forums/index.php/m/635978/?srch=birt+doc#msg_635978
> on this page you have suggest to remove following plugins
>
> org.eclipse.birt.report.engine.emitter.prototype.excel_2.6.1 .v20100812
> org.eclipse.birt.report.engine.emitter.excel.config_2.6.1.v2 0100812
> org.eclipse.birt.report.engine.emitter.ppt.config_2.6.1.v201 00812
> org.eclipse.birt.report.engine.emitter.ppt_2.6.1.v20100909
>
> I am using jars of 3.7.1 version in that above jars are not available.
> Please help me on this topic
> When I open report.doc it looks like below,
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?mso-application progid="Word.Document"?>
> <w:wordDocument
> xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
> xmlns:v="urn:schemas-microsoft-com:vml"
> xmlns:w10="urn:schemas-microsoft-com:office:word"
> xmlns:o="urn:schemas-microsoft-com:office:office"
> xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
> xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
> xmlns:aml="http://schemas.microsoft.com/aml/2001/core"
> xml:space="preserve">
> <o:DocumentProperties>
>
>
> I tested same code on linux fedora and linux mint, on both machine got
> the same output with xml tags,
> Please suggest me something.
>
>
> Thanks,
> Deepali.
Previous Topic:Change Chart Grouping unit and interval
Next Topic:birt List java bean as dataSource
Goto Forum:
  


Current Time: Fri Mar 29 01:26:18 GMT 2024

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

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

Back to the top