[resolved] Image Url does not work

Hello, I have some troubles with integrating images into my jasper report. Both Urls are accessible via Browser, but only the first one is printed.

Why does this image expression work:

            <image>
                <reportElement x="60" y="10" width="50" height="50" uuid="cd4bc105-1f9e-4cad-ad4a-4b4b6553958e"/>
                <imageExpression><![CDATA["http://jasperreports.sourceforge.net/jasperreports.png"]]></imageExpression>
            </image>

and this one not - which is also accessible via browser under this url:

            <image>
                <reportElement x="232" y="10" width="50" height="50" uuid="cd4bc105-1f9e-4cad-ad4a-4b4b6553958e"/>
                <imageExpression><![CDATA["https://localhost:9002/medias/logo.png?context=bWFzdGVyfGltYWdlc3wxMzY0O..."]]></imageExpression>
            </image>

Does jasper not support https? Or is there another way to include it?

BR

 

m.schroettner's picture
Joined: Oct 10 2021 - 11:19pm
Last seen: 1 year 7 months ago

hi,

Junaid_Rehman - 1 year 7 months ago

3 Answers:

hi,

Have you resolved this issue? I meet the same, I use jasper soft 7 final pro, and can't show image by url like this.

example: I want to display "http://www.jasperreports.sourceforge.net/jasperreports.png" to Image Element, but it seem not work with jaspersoft 7.

I see some advice like this:

<image onErrorType="Blank" hyperlinkType="None">
<imageExpression class="java.lang.String">

<![CDATA["http://www.translatorscafe.com/cafe/images/flags/"+$F{Country_ISO3166} +".gif"]]>

</imageExpression>

</image>

but with the new version of jaspersoft, when I put code: <imageExpression class="java.lang.String">, it's always disapear.

Junaid_Rehman's picture
Joined: Sep 14 2021 - 2:30pm
Last seen: 1 year 7 months ago

No not resolved - and yes the class="java.lang.String" also disappears for me.

m.schroettner's picture
Joined: Oct 10 2021 - 11:19pm
Last seen: 1 year 7 months ago

my problem was that JR can't resolve the localhost url - generated report in my java application: works. No java.lang.String is needed.

 

@Junaid_Rheman I can only guess that your url is not correctly appended

m.schroettner's picture
Joined: Oct 10 2021 - 11:19pm
Last seen: 1 year 7 months ago
Feedback
randomness