2006 IR Open Dicussion Posted September 5, 2006 Share Posted September 5, 2006 By: Rob Karatzas - tutor same parameter MASTER and SUBREPORT(S) 2006-04-17 10:05 Hi Folks I have a WORKING report as far as the subreport receiving a parameter from MASTER and it doing the correct thing in the SUBREPORT. For the life of me, I cannot figure out a way to supply a parameter to the MASTER report and have it bring back anything (from): SELECT fle.ename AS FILENAME, blb.FILEBLOB AS FILEIMG, VERNO, REF.REFID AS ILLID,REF.REFID AS MILLID FROM (POJREFFLE REF LEFT JOIN APPDEFFLE fle ON REF.FLEID = fle.FLEID) LEFT JOIN APPDEFFLEDAT blb ON fle.FLEID = blb.FLEID WHERE REF.REFID in P${ILLID} If I 'hardwire' it in (1,2,3,4) it works fine. Is there a way to get this to work interactively in ireport? (and yes we bought the manual :) EVERY example I've found has parameters being fed to the subreport, but nothing at the MASTER level. The only thing I can think of is that this doesn't work in ireport and has to be done progamatically via REPORT_DATA_SOURCE. pls help, I've already spent a morning on this and it's sucking out my life force... rob By: cyclistca - cyclistca RE: same parameter MASTER and SUBREPORT(S) 2006-04-17 11:33 On each parameter the is a box you can check off "Is for prompting". This will cause a box to appear when you run your report from iReports. By: Rob Karatzas - tutor RE: same parameter MASTER and SUBREPORT(S) 2006-04-17 11:40 tried that and I get a prompt, but never any returned data... even tried creating a 2nd parameter just for the MASTER portion (this is the field MILLID in the SQL I psoted initially)... odd thing (I think) is that when I tried a 2n parameter, I didn't see anything in the XML (like what I see for the subreport parameter: <parametersMapExpression><![CDATA[$P{ILLID}]]></parametersMapExpression> <subreportParameter name="ILLID"> <subreportParameterExpression><![CDATA[$F{ILLID}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression class="java.lang.String"><![CDATA["subIllustrationPrintv9.jasper"]]></subreportExpression>) should I be? thanks rob By: Rob Karatzas - tutor RE: same parameter MASTER and SUBREPORT(S) 2006-04-17 11:55 another (VERY) odd thing is that my subreports work just fine (when the master has hardcoded values in the SQL). HOWEVER, I just tried running (A GOOD) subreport standalone by having the (one) parameter prompted for and it comes back with NO RESULTS as well? my version is 1.2 and my only parameter is bigdecimal type. (backend is Oracle 9.2) do we have a bug? rob By: Rob Karatzas - tutor RE: feature not functional 2006-04-18 04:29 this feature is NOT functional (all of my reports are running just fine from Java using parameters). as stated in the 1.2 manual on page 80: "At the moment the property “is for prompting†is not used by iReport and it is not relevant for the aim of the print..." this is interesting, since this makes little sense to a checkbox with 'is for prompting' if it doesn't take in the value and use it... rob By: cyclistca - cyclistca RE: same parameter MASTER and SUBREPORT(S) 2006-04-18 09:16 "is for prompting" does work. I use it all the time. I think this is a deficiency in the documentation and not the product. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now