How to create Parameters for Ireport

Asked

Viewed 252 times

1

I am developing a Java Software where the user registers. Each registered product can be printed. Each product may have several images and these images should be printed together with the data of the other products. It can happen that there is no image. I would like to create parameters in the form in real time to pass each image to be displayed on iReport and be printable. The data is already showing. Only the images are missing. Can someone help me?

1 answer

0

The image needs to be passed as a Bufferedreader by the Map parameter, reading the image from an Image can facilitate.

Should not need a check to make it optional, but check.

Inside the . jrxml will have to set a parameter passing the name whose representation is the key of the Map, and the class in which it will represent the Image, follows an example

<parameter name="CLIENT_IMAGE" class="java.awt.Image" isForPrompting="false">
    <defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>

As you have already passed other data in text, the image does not escape much of how it is done.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.