My issue here is I setup this parameter in my sql code but for Jaspersoft does not see it........I say that because it doesn't turn red like it should in the dataset and query dialogue popup window. Am I doing something wrong here?
and s.productid in (select s_sample.productid from labvantage.s_sample where s_sample.productid = $P{PROD_ID})
Thanks in Advance!
1 Answer:
I use subselects extensively within reports without issue. Assuming your querie(s) are valid, are you using the paremeter PROD_ID within a subdataset? That's the first thing that comes to mind if the editor cannot "see" your parameter where you're referencing it. If so, you need to map that parameter from the main report to the subdataset; in other words you need to pass it to the subdataset to make it available to the subdataset query. This happens in the datasetRun portion of jrxml:
</datasetParameter>