матніѕ83
матніѕ83

Reputation: 103

iReport Import Background Image

I would know how to import a background image on iReport designer 4.1.2.

These are the step I take:

The background image appears properly in the report but when launch the preview it disappears!

What's wrong? I miss something?

PS: I discarded the Background band solution because the image exceed the report margins.

Upvotes: 10

Views: 37641

Answers (6)

user10496074
user10496074

Reputation: 1

  1. use the background band
  2. Make it of preferable size
  3. Drag the image icon in the pallet into the background band 4.position it i.e centre, lefr or right. save and preview

Upvotes: 0

Thilina Rubasingha
Thilina Rubasingha

Reputation: 1089

I think iReport Background image (view -> Report designer -> Import Background image) option is to use for Pre printed reports. When you need to print report details to pre printed page its very difficult to make alignments and create exact report. For this you can scan the pre printed page and load it as background image (view -> Report designer -> Import Background image) and then align the report parameters as scanned pre printed page. While you printing it automatically remove the inserted background. Please correct me if I'm wrong.

Upvotes: 0

sbsekar
sbsekar

Reputation: 67

Using Image option from (Window > Palette) is the better way to display the image in iReport. Keeping the image under Page Header helps to display the image in each page.

Upvotes: 0

Celine
Celine

Reputation: 21

I had the same problem as mentioned above. I realized that all you need to do is to:

  1. Make sure the palette is open by selecting Windows > palette
  2. Click on image and it will prompt you to select an image from your browser.
  3. If you want to set the image as the background image, simply shift the image item in the report inspector to the background band.

Upvotes: 2

mdahlman
mdahlman

Reputation: 9390

Sorry, I didn't read the question carefully at first. You need to use the background band. Resize your image to be the appropriate size so you can use it. After doing that...

Export to PDF and you should see the background image. Export to XHTML and you should see the background image.

When you export to HTML background images won't display. The FAQ link on the JasperReports page explains things (like this!) that you need to consider in HTML reports.

The background image does not do what you want. It is intended to provide a background while you are editing the report in iReport. It has no effect on the final report.

Upvotes: 7

Alex K
Alex K

Reputation: 22857

It seems to be that this iReport's option (Import Background Image) does not affect on report, it is affect on GUI appearance. May be this is a bug.
I did not find ireport.background.image or ireport.background.image.properties properties usage in JR source codes. The exported report in html format does not contain image (set in ireport.background.image).

You should use Background band for creating watermarks or something else.

Upvotes: 3

Related Questions