Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Change output folder of chart images
bb_andre
Hi there,
i want to change the behaviour of handling the charts in a report. At this time BIRT saves (when I save the report as *.html) the charts in a subfolder called "images" and then custom1, custom2, ... , custom_n ! I don?t want to store them in a subfolder an I want to name them like the report together with an number. Is there a way to implement this easily ? At this time I try to do this with the BIRT-Runtime from CVS...
Greetings
Andr? J.
Find more posts tagged with
Comments
mwilliams
Andr?,
You might be able to change the location of the images folder in your web.xml. As far as the naming of the files, I'm not sure where this happens in the code, whether it's part of the HTML emitter or the HTMLRenderOption or both.
bb_andre
Michael,
thanks for your answer. I don?t understand what do you mean with "web.xml". I know my tomcat has got an web.xml but in BIRT I don?t have one. I try to describe my situation. I have got an BIRT-Report with Charts in it. I generate these reports with the BIRT-Runtime and have many folders (our employees) with the HMTL report in it and an /images folder with the custom1.jpg,.... charts. Now I copy the content of the folders into an lotus notes database (automatically by an agent).
So I don?t use the birt web viewer to display reports. I hope you understand my situation :-)
mwilliams
BIRT_VIEWER_IMAGE_DIR - Specifies the default location to store temporary images generated by the report engine. If this setting is left blank, the default location of webapp/report/images is used.
This is the setting in the web.xml for the viewer. I know you don't use the viewer, but the viewer just uses the APIs to render reports, so this value is probably settable somewhere in the API. Possibly with something like:
HTMLRenderContext renderContext = new HTMLRenderContext();
renderContext.setImageDirectory(folderPath);
As far as what the images are named, do you set the name of the chart in your report design? I don't know this for sure, but if you set a name, maybe BIRT will use the name rather than "custom1", etc.
bb_andre
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="76162" data-time="1303400381" data-date="21 April 2011 - 08:39 AM"><p>
BIRT_VIEWER_IMAGE_DIR - Specifies the default location to store temporary images generated by the report engine. If this setting is left blank, the default location of webapp/report/images is used.<br />
<br />
This is the setting in the web.xml for the viewer. I know you don't use the viewer, but the viewer just uses the APIs to render reports, so this value is probably settable somewhere in the API. Possibly with something like:<br />
<br />
HTMLRenderContext renderContext = new HTMLRenderContext();<br />
renderContext.setImageDirectory(folderPath);<br />
<br />
As far as what the images are named, do you set the name of the chart in your report design? I don't know this for sure, but if you set a name, maybe BIRT will use the name rather than "custom1", etc.<br /></p></blockquote>
<br />
Thanks for your answer. I have now the source of my runtime version and could change the behaviour of the "HTMLCompleteImageHandler" so I could generate my own engineapi.jar !<br />
<br />
EDIT: I got a new idea. I?m searching for an solution to fetch the "-o" parameter of my batch file that calles the "genReport.bat" from BIRT !!
bb_andre
<blockquote class='ipsBlockquote' data-author="'bb_andre'" data-cid="76218" data-time="1303802540" data-date="26 April 2011 - 12:22 AM"><p>
Thanks for your answer. I have now the source of my runtime version and could change the behaviour of the "HTMLCompleteImageHandler" so I could generate my own engineapi.jar !<br />
<br />
EDIT: I got a new idea. I?m searching for an solution to fetch the "-o" parameter of my batch file that calles the "genReport.bat" from BIRT !!<br /></p></blockquote>
<br />
I have got finished now with success. I have customized the "HTMLCompleteImageHandler" to realise my wishes.<br />
<br />
Thanks for your help !!
mwilliams
Glad to hear you got it working for you. Let us know whenever you have BIRT questions!