stcyr1 Posted August 31, 2012 Share Posted August 31, 2012 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 Link to comment Share on other sites More sharing options...
cidsphere Posted October 22, 2012 Share Posted October 22, 2012 This question needs some attention from someone, maybe Jasper team. I tried to find how the expressions are parsed in JasperReports source code without success. A little help would be greatly appreciated here. Or maybe @stcyr1 found the response himself and didn't share it with the community ? ;) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now