#1 2021-07-13 10:32:21

Padma
Member
Registered: 2021-02-03

Issue while executing jasper report in report server with JPG image

Hello All,

I have a jasper Report (contains parameters) that is working fine on the jaspersoft studio.  I have uploaded the jrxml in the reportserver environment and selected the datasource as well. jrxml having JPG image.

i am trying to run the report in report server environment. After providing parameters , I am facing below error during report execution.



Error: An error occurred during report execution.
The report could not be executed: No subreport of name rsfsx://jaspersubreport/809add44-1395-46bb-a434-20878d12439d/cherry found.
To get help please contact an administrator.



Below is the code snippet where i am facing issue:

<image>
    <reportElement x="725" y="0" width="77" height="102" uuid="651ccc4b-e999-40fe-bcbf-1f25bcfc98af"/>
    <imageExpression><![CDATA["cherry.jpg"]]></imageExpression>
</image>


Note: if I removed <imageExpression> tag it is working fine.


Can anyone please help me, how to get JPG images in the report.



Thanks,
Padma

Offline

#2 2021-07-13 11:57:23

jalbrecht
Administrator
Registered: 2016-10-21

Re: Issue while executing jasper report in report server with JPG image

Dear Padma,

somehow reportserver must find the image during execution time. Take the following steps:

1. Upload the image file myimagefile  to the RS virtual FileSystem, a good place may be the folder ressources. Check here for further detail: https://reportserver.net/en/guides/admi … le-System/. This way the image (maybe a logo ...) can be used by many reports.
2. Create a global constant (Administration global constant) named P_myimagefile for the image file with the URL value, somehow like      http://myipadress/reportserver/fileServerAccess?id=myimagefileid. Test it via copying the expression in the adress field of some browser on the server.
3. Eithin the report create a parameter P_myimagefile with default value whereever/myimagefile(.png). Not: this is for the (local) development environment to work.
4. Within the report refer to the parameter in the imageExpression, somehow like : <imageExpression><![CDATA[$P{P_myimagefile}]]></imageExpression>.   Reportserver replaces the parameter with the value of the global constant during execution.

Happy reporting !
Jan

Offline

#3 2021-07-13 16:21:04

Padma
Member
Registered: 2021-02-03

Re: Issue while executing jasper report in report server with JPG image

Hi Jan,

I just copied the image into the "http://Server:localhost/reports/images/cherry.jpg" and mentioned the URL in the <imageExpression> tag.

it is working fine now.


Thank you so much for your support.

Offline

#4 2021-07-26 11:09:24

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Issue while executing jasper report in report server with JPG image

Hi Padma,

thanks for letting us know, we are glad this is working now.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB