Jump to content
Changes to the Jaspersoft community edition download ×

Recommended Posts

By: Ruben Misrahi - rnmisrahi


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})



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.






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

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...