Jump to content

Creating an Input Control


wayne.shepherd

Recommended Posts

I am using Jaspersoft Studio Professional and I am trying to create an "Input Control" that has 2 elements "Invoice Address" & "Delivery Address".  If the "Invoice Address" is selected then the report needs to filter the addresses that have a "SalesLedger.Customer.Address.AddAddressNumber" < 101.  If the "Delivery Address" is selected then it needs to filter the addresses that have a "SalesLedger.Customer.Address.AddAddressNumber" > 100.

 

I hope that someone can help

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You should make use of "$P!" Parameters in Jasper.

Your SQL query should be like:

Select col1, col2 from table where myownfilters and $P!{newParam}

Then in your jasper report, add this parameter newParam and set the default value as:

$P{yourInputControl} == "Invoice Address" ? "SalesLedger.Customer.Address.AddAddressNumber" < 101 : "SalesLedger.Customer.Address.AddAddressNumber" > 100

Hope this helps!

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