Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Urget help needed! Jasperreport and subreports in pentaho

  1. #1
    Join Date
    Jan 2006
    Posts
    245

    Default Urget help needed! Jasperreport and subreports in pentaho

    Hi guys,

    I've a set of jasperreport's reports that has to be published in pentaho portal. The problem is that I'm not able to publish
    all the reports that has subreports, and they're the majority, so this is a big issue for me.

    Whenever I run a report with subreports inside I've got the following error

    10:19:55,281 INFO [STDOUT] 10:19:55,281 ERROR [JasperReportsComponent] 3d599f8a
    -a7f6-11dd-ab1a-010196877cb5:COMPONENT:context-14795749-1225531192406rova.xact
    ionBase.ERROR_0002 - Esecuzione della componente fallita
    java.lang.NullPointerException
    at net.sf.jasperreports.engine.JRPropertiesMap.readObject(JRPropertiesMa
    p.java:185)
    at sun.reflect.GeneratedMethodAccessor358.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)

    Is there someone that can help me in solving this issue quickly?

    Kind regards

    Sergio

  2. #2
    Join Date
    Jul 2007
    Posts
    2,498

    Default

    It's probably because it can't find the subreport.

    There's a non-documented feature in that component: You can use the parameter 'REPORT_FOLDER' and use that location to specify where the subreport is.

    Code:
    $P{REPORT_FOLDER} + "/rpt_subreport0.jasper

    HTH
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  3. #3
    Join Date
    Jan 2006
    Posts
    245

    Default

    Pedro, I tried you suggestion but it doesn't work.

    Moreover I've to say that previously I already tries to set in in SUBREPORT_DIR the complete path to the report folder where I had the report and the subreports and it hasn't worked. My opinion is that it isn't something related to the path but could be something else.

    Kind regards

    Sergio

  4. #4
    Join Date
    Jul 2007
    Posts
    2,498

    Default

    Right, if the full path doesn't work then my suggestion will not help.

    I have no say that I've used subreports, though not in 2.0
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  5. #5
    Join Date
    Jan 2006
    Posts
    245

    Default

    Looking at the complete stack (I've not posted it entirely because is so long) the system rightly accesses the subreport but it gaves the exception specified in my first message while is trying to load a parameter map for the subreport. The subreport taks one parameter in input that is fully given by the main report. I don't know what is reallly missing there....

  6. #6
    Join Date
    Jan 2006
    Posts
    245

    Default

    I've solved my problem.

    The jasperreport libraries distributed with the pentaho-solution-demo-v1.7.1 were related to jasperreport 2.0.5. On the other side, my reports were
    developed with jasperreport 3.0.1. So, i substituted jasperreport jar libraries in pentaho.war/WEB-INF/lib and everything worked correctly.

    Regards

    Sergio

  7. #7
    pstoellberger Guest

    Default

    additionally you can substitute the itext.jar with the one you get with ireport (thats what i did to make gantt charts in jasperreports run)

    does html output works for your jasperreport? because mine doesnt.. only pdf/csf/xls

    -paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.