How to use the where clause in Jasper using parameters in this query?

0

 

SELECT

p.INTERNAL_NAME "Provider Name",

G.DESCRIPTION "Geo Name",

GT.DESCRIPTION "Geo Type",

GZ.ZIP_KEY "Associated Zip Code",

PA.AMOUNT "Adjustment Amount",

PA.WEIGHT "Adjustment Weight",

PAT.DESCRIPTION "Adjustment Type", 

p.IS_ADULT "Adult Flag",

p.CODE "Provider Code"

FROM UNU.PROVIDER P

JOIN UNU.PROVIDER_ADJUSTMENTS PA on P.KEY=PA.PROVIDER_KEY

JOIN UNU.ADJUSTMENT_TYPE PAT on PA.ADJUSTMENT_TYPE_KEY=PAT.KEY

JOIN UNU.GEO G on PA.GEO_KEY=G.KEY

JOIN UNU.GEO_TYPE GT on G.GEO_TYPE_KEY=GT.KEY

JOIN UNU.GEO_ZIPS GZ on G.KEY=GZ.GEO_KEY

WHERE P.INTERNAL_NAME='\&PROVIDERNAME' or P.CODE='\&ProviderCODE'

GO

polubothusatish's picture
Joined: Jul 23 2013 - 6:10am
Last seen: 5 years 5 months ago

1 Answer:

0

Hi,

if you have configured the Parameters you can use them like this:

 

WHERE P.INTERNAL_NAME=$P{PROVIDERNAME}or P.CODE=$P{ProviderCODE}

 

You can find this here:

http://community.jaspersoft.com/documentation/ireport-ultimate-guide

astrid.guenther's picture
Joined: Aug 27 2013 - 2:29am
Last seen: 3 years 6 months ago

Thank You, it worked!

polubothusatish - 5 years 11 months ago

My pleasure!

astrid.guenther - 5 years 11 months ago

Can you explain to me if I had to add it to the respiratory in JasperServer:
would I write it like: $X(IN, p.INTERNAL_NAME, PROVIDERNAME) OR $X(IN, p.CODE, ProviderCODE)

polubothusatish - 5 years 11 months ago
show 1 more...

I do not think that you have to change something concerning the Parameters, if you deploy your report on JapserServer.
Did it work for you in iReport? What error message did you get on JasperServer?

astrid.guenther - 5 years 11 months ago
Feedback
randomness