Sub Report Path ( Failed to resolve real path)

0

Hi All,

I am currently tyign to use jasper report in Java project , i  was able to design report and compile jasper but getting issue when runnign report , i am currrently facign issue with loading subreports  and imates. Below is the folder structure of jasper reports

  • com(package of applications)
  • net(package of jasper)
  • resources
    •  jasperreport
      • main.jasper
      • subreport1.jasper
    •  reprots
      •   image
        •  sunset.jpg

  in main.jasper ( i am refering to images and subreport1.jasper) , below is the code , this throws exeption as byte data not found

<subreportExpression><![CDATA["/resources/jasperreport/subreport1.jasper"]]></subreportExpression>

I tried with bleow approach , this throws exeption as byte data not found

<subreportExpression><![CDATA["subreport1.jasper"]]></subreportExpression>

Below is code that works

<subreportExpression><![CDATA["resources/jasperreport/subreport1.jasper"]]></subreportExpression>

Though above mentioned approach works but i get warning

Failed to resolve real path for file resources/jasperreport/subreport1.jasper

vickyb2084's picture
Joined: Oct 30 2019 - 3:19am
Last seen: 1 month 3 weeks ago

0 Answers:

No answers yet
Feedback