Jump to content
We've recently updated our Privacy Statement, available here ×

stcyr1

Members
  • Posts

    2
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Posts posted by stcyr1

  1. Hi,

    Can someone explain me how I can "evaluate" a subreport's expression?

    I mean, I'm getting a subreport's expression using the getExpression() method:

        JRExpression expression = subreport.getExpression();

    If I cast this expression into a String, I can find back my subreportexpression parameter's value ('$P{SUBREPORT_DIR} +"subreport_1.jasper"'):

        String s = expression.toString();

    Now, what I would like is to find the actual filename this expression refers to. That's, translating '$P{SUBREPORT_DIR} +"subreport_1.jasper"' into "/usr/lib/reports/subreports/subreport_1.jasper"). Hopefully, without going through the JRExpression->String cast.

    Is there a nice way to do that? Or am I stuck with the solution explained at http://stackoverflow.com/questions/10004800/jasper-reports-how-to-compile-subreports ?

    Best regards,

    Cyrille

×
×
  • Create New...