2002 JI Open Discussion Posted August 18, 2006 Share Posted August 18, 2006 By: Ruben Misrahi - rnmisrahi parameters 2003-06-05 13:28 I'm tryin to use parameters and it fails in its simplest form: I have: <parameter name="pSearch" isForPrompting="false" class="java.lang.String"/> Then I define a variable: <variable name="vSearch" class="java.lang.String" resetType="Report" calculation="Nothing"><variableExpression><![CDATA[($P{pSearch}==null)?"Search":"No Search" ]]></variableExpression><initialValueExpression><![CDATA[new String($P{pSearch}) ]]></initialValueExpression></variable> I put both the parameter and the variable associated to it in a report and in my code I have: parameters.put("pSearch", new String("Search Criteria: bla bla")); JasperFillManager.fillReportToFile(cfMain.Comm.getReports_Directory() + fileName + ".jasper", parameters, new QDataSource(tdsReports)); I always get null both in pSearch and vSearch. Why? By: Ruben Misrahi - rnmisrahi RE: parameters (Ignore) 2003-06-05 13:48 Forget about this issue. I was placing the parameters in the wrong place in my code. Sorry about this. By: Gregory A. Swarthout - gswarthout RE: parameters 2003-06-05 14:30 No obvious problem, but we're missing the part of the report which displays those values. That might shed light on things. 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