views:

27

answers:

2

I have BIRT integrated into web application. I can't seem to find a way to get images to show up during development/preview within Eclipse and deployment. I have tried different setting. It works in one or the other, not both. I do not want to put images in the same place as the reports or embed them.

Please suggest what is the best place to put images so that there is a true WYSIWYG between development and deployed code.

A: 

Have you tried embedding the images in the report? If they are not likely to change, this path means your images will be available regardless of where you deploy the report.

If you do not want to embed the images, you can add the images any number of ways, including just adding them to your BIRT project. How are you adding them now?

MystikSpiral
The reports are in the project. However, the project itself is not truly a BIRT project. It is a portlet project that contains BIRT reports. The reports are in WEB-INF/reports while the images are in WEBCONTENT/images. This arrangement works in preview however when I deploy the reports no images show in the runtime environment.
shikarishambu
A: 

It sounds like you're adding an image file as a shared resource.

If you look in the XML Source of the report, you should see the image defined somewhere, such as:

    <image id="7">
        <property name="height">0.25in</property>
        <property name="width">3.0in</property>
        <property name="source">file</property>
        <expression name="uri" type="constant">report_folder/logo/my_logo.png</expression>
    </image>

When you deploy your report, it will look for the image in this folder, relative to the defined root folder. If you're using the birt webviewer, you would set your root folder in the web.xml as:

<!--
    Temporary document files directory. Defaults to ${birt home}/documents
-->
<context-param>
    <param-name>BIRT_VIEWER_DOCUMENT_FOLDER</param-name>
    <param-value></param-value>
</context-param>
Adam