开发者

BIRT - Where should I put images so that it is available on preview and delpoyed into webapplication

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.


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>


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜