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

One to Multiple Parameters to Report


tmiller_1
Go to solution Solved by tmiller_1,

Recommended Posts

Didn't find what I was looking for in the forum but if this is already answered point me in the right direction.

What I am trying to do is create a report that would allow one to serveral (not sure on how many) parameters to be passed to generate a report.

So what the report consists of is a user will input a Charge Code and they can enter in One code and run the report or they can enter 10 Charge Codes and run the report.

What do I need to do to allow for this?


Thanks,
TM

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

Well the goal is that they can input several "Codes" to run the report from. I can do a single but I want a multiple codes to be inputted and update the sql accordingly.

 

my current query is the following.

Where (Year(chg_srv_ts)=2013) AND ((chg_code=7111))

 

So what I am thinking is the following if they are doing multi entry.

Where (Year(chg_srv_ts)=2013) AND ((chg_code=7111) or (chg_code=7221) Or (chg_code=8155))

 

Any Ideas.

Link to comment
Share on other sites

Hi,

Your query where  condition in report may be:

Where Year(chg_srv_ts)=2013) AND chg_code in (7111 ,7221,8155) or

if you are using parameter for chg_code like $P{chg_code} then query becomes

Where (Year(chg_srv_ts)=2013) AND $X{IN, chg_code, $P{chg_code} } =====$P{chg_code} datatype java.util.collection or  java.util.list

and your multiselect list input control query is select chg_code from table_name

Hope this helps.

Thanks

Ajinkya

Link to comment
Share on other sites

  • Solution

Okay after much assistance from everyone this is what I ended up doing.

Set the Charge Code Parameter to a Collection.

Changed the query to the following

Where (Year(chg_srv_ts)=2013) AND ($X{IN, field_chg_code, parameter_chg_code })

Then on the form itself had to change the language from groovy to Java or else you will get errors.

TM

Link to comment
Share on other sites

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