Jump to content
Changes to the Jaspersoft community edition download ×

How to add subreport with image to main report


alauddinctgbd

Recommended Posts

Hi,

My Subreport contains two images.

First i add them to my image folder repository(logo.gif).

 

Then repo:/images/logo will work fine for subreport.

 

But when I submit the subreport to repository

as header.jrxml and try them from main report

as [repo:header] are not working.

 

The following error occor:

org.springframework.webflow.ActionExecutionException: Exception thrown executing [AnnotatedAction@1573e33 targetAction = com.jaspersoft.jasperserver.war.action.ViewReportAction@b48e23, attributes = map[[empty]]] in state 'verifyData' of flow 'viewReportFlow'; nested exception is java.lang.NullPointerException: null

java.lang.NullPointerException

at com.jaspersoft.jasperserver.api.engine.jasperreports.util.repo.RepositoryConnection.getInputStream(RepositoryConnection.java:68)

at java.net.URL.openStream(URL.java:1007)

at net.sf.jasperreports.engine.util.JRLoader.loadBytes(JRLoader.java:327)

at net.sf.jasperreports.engine.util.JRImageLoader.loadImageDataFromURL(JRImageLoader.java:104)

at net.sf.jasperreports.engine.util.JRImageLoader.loadImageDataFromLocation(JRImageLoader.java:151)

at net.sf.jasperreports.engine.JRImageRenderer.getInstance(JRImageRenderer.java:190)

at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:471)

at net.sf.jasperreports.engine.fill.JRFillImage.evaluate(JRFillImage.java:420)

at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:277)

at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:399)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1289)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:631)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:228)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:750)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:647)

at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:494)

at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:63)

at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:137)

at java.lang.Thread.run(Thread.java:595)

 

 

java.lang.NullPointerException

java.lang.NullPointerException

at com.jaspersoft.jasperserver.api.engine.jasperreports.util.repo.RepositoryConnection.getInputStream(RepositoryConnection.java:68)

at java.net.URL.openStream(URL.java:1007)

at net.sf.jasperreports.engine.util.JRLoader.loadBytes(JRLoader.java:327)

at net.sf.jasperreports.engine.util.JRImageLoader.loadImageDataFromURL(JRImageLoader.java:104)

at net.sf.jasperreports.engine.util.JRImageLoader.loadImageDataFromLocation(JRImageLoader.java:151)

at net.sf.jasperreports.engine.JRImageRenderer.getInstance(JRImageRenderer.java:190)

at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:471)

at net.sf.jasperreports.engine.fill.JRFillImage.evaluate(JRFillImage.java:420)

at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:277)

at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:399)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1289)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:631)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:228)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:750)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:647)

at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:494)

at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:63)

at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:137)

at java.lang.Thread.run(Thread.java:595)

 

 

 

Is there any new syntax to access images of subreport

from main report or any example.

 

Any help appriciated

 

 

Alauddin

 

Post edited by: alauddinctgbd, at: 2006/09/16 12:35

Post edited by: alauddinctgbd, at: 2006/09/16 12:42

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

 

I got the exact same problem. I got a report wich contains a subreport and 1 image.

 

All ressources are upload in the repository, and all ressources are used with 'repo:/repo_path/ressource_name" syntax.

 

If I test the subreport only, everything works. And it doesn't work when I test the main report.

 

But if I remove the image in the subreport, everything works again.

 

Please help !

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...