Jump to content
Changes to the Jaspersoft community edition download ×

passing query string as parameter

Recommended Posts

By: elis - pelis

passing query string as parameter

2002-12-11 20:42


I've been told that I can pass my query string as a parameter to my report. My select statement is based on user entries in a screen. Many of the entries (about 10) are optional so I want to include them in my select statement only if the user has entered something. That's why I want to check for those entries and build my query string in my application and then pass it to the report (xml).

I tried to create the 'where-clause' in my application and pass it to my report as follows:

in application: String 'where-clause' = "where account = 12345"

and in xml file: <parameter name="where-clause" class="java.lang.String"/>



table1.transit TRANSIT,

table1.group GROUP_NAME,

table1.address ADDRESS


from table1


order by table1.transit


Follwoing is the error I get when I compile the report:

I get the error:

dori.jasper.engine.JRException: Errors were

encountered when compiling report design:

statementlist.java:24: ';' expected.


private JRFillParameter parameter_where-clause

= null;




1 error
















at StListReportCompiler.<init>



at StListReportCompiler.main



I will appreciate your help on this.




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