0

I have installed Jasperserver at "hostname2" and "hostname1" is located at CMS.

I run a report on "hostname1" in which, html image links look like /images/img_**** and are not displayed. They should have been, instead, like this: http://"hostname2"/images/img_****.

The main thing is that they have the correct link to the image... Has anyone faced with this kind of problem before?

Cihan Keser
  • 3,190
  • 4
  • 30
  • 43
Nohcho
  • 1
  • 1
  • 1
    You should use expressions like this: `<![CDATA["repo:/images/frog.png"]]>` – Alex K Sep 24 '12 at 13:49
  • but what do with charts? report has no final name for the charts. how set normal url for charts and other generated resources? – Nohcho Sep 26 '12 at 10:27

1 Answers1

0

If your image is placed in the same directory where the .jasper(compiled jrxml files are present) then,

<imageExpression class="java.lang.String"><![CDATA["image_name.jpg"]]></imageExpression>
Nilesh
  • 303
  • 7
  • 20
  • but what do with charts? report has no final name for the charts. how set normal url for charts and other generated resources? – Nohcho Sep 26 '12 at 10:27
  • If the charts which are generated are being generated by your application itself. Make sure they get generated and get saved with a particular name(if the number of generated resources is predefined). And you can mention the name in the expression. – Nilesh Sep 27 '12 at 09:55
  • what if the image_name.jpg is under a folder inside the compiled jrxml directory? – user1169587 Feb 25 '21 at 08:28