I. Overview
FineReport allows you to insert images to cells, so as to make more beautiful reports.
You will learn |
---|
|
II. Insert Images
Threre are three ways to insert an image.
1. Method 1
In the right-hand pane, click the drop-down box and select Insert Image
2. Method 2
In the upper toolbar, click Insert->Cell Element->Insert Image .
3. In the upper toolbar, click the [image] icon
4. Select an image in the pop-up window
1) Click Select Image.
2) Navigate to webapps/webroot/help/picture under the installation folder of FineReport.
3) Select an image, and then double-click it or click Open.
Note:It is recommended to save the image in the folder named webapps under the installation folder of FineReport.
III. Image Display Mode
1. Display mode: Default
2. Change the cell size and the image keeps its original size
Preview the effect.
3. Display Mode: Tile
1) To change the display mode, double-click the cell with an image, or in the right-hand pane, click the Edit button.
2) Select Tile and click OK.
4. Resize the cell, and the image reoccurs to spread across the cell
Preview the effect.
5. Display Mode: Stretch
6. The image will change its shape to fit the cell shape
Preview the effect.
7. Display Mode: Adaptive
8. The size of image will change to fit the cell size while remain the original length-width ratio
Preview the effect.
IV. Precautions
Description of the problem : After uploading a picture with a transparent background to the cell, the transparent color becomes black. As shown below:
Reason analysis :
When the transparency of the image is lower than 5%, the PNG image will be converted into a JPEG image for compression. In the process of converting the format compression, the transparency channel will be lost, and the transparent color will become black.
1) If the FR designer is version 10.0.18 and earlier, the reason is that it is checked Cellpress Images when selecting an image to upload in the cell. As shown below:
2) If FR Designer is version 10.0.19, the reason is that it is checked in Options > Advanced >Compress Images. As shown below:
Solution :
Uncheck Compress Images .