cek.i06go Posted January 20, 2014 Share Posted January 20, 2014 I'm created a report with JasperStudio 5.5 that have many parameter defined in the main and a lot of sub-dataset (defined with tables) that required this parameters.The situation:/main/Parameters: myPar/main/mySubDataSet1//main/mySubDataSet2/.../main/mySubDataSetN/The sub-dataset need to use this parameter in her query: select * from Tab t where t.attr = $P!{myPar}So, my problem is that the sub-dataset can't access at this main paramenter, all the time that i try compiled, the program send me "Parameter not found : myPar".How i can do for use myPar in the sub-dataset?p.s.: i read this thread Pass main dataset parameter to subdataset query (based on iReport) but without success... Link to comment Share on other sites More sharing options...
Solution cameron_1 Posted January 20, 2014 Solution Share Posted January 20, 2014 Parameters are attached to the dataset, if you expand the dataset itself, you'll find a section there for parameters, just like in your main report.You'll need to link the parameters together though, using the connection properties where you're actually using the dataset, eg, in a chart or a table. For example, in the table, you go to the dataset tab of the properties pane, and click on the parameters button to map the parameters between your main report and your sub dataset. Link to comment Share on other sites More sharing options...
cek.i06go Posted January 20, 2014 Author Share Posted January 20, 2014 works a lot!!! thx :) Link to comment Share on other sites More sharing options...
feroxneto Posted March 18, 2014 Share Posted March 18, 2014 Thanks a lot Cameron, you are a life saver :) Link to comment Share on other sites More sharing options...
max_max_mir Posted May 10, 2014 Share Posted May 10, 2014 This was the best reply I've seen so far! Saved me tons of time. Link to comment Share on other sites More sharing options...
bit.mind.100 Posted October 10, 2014 Share Posted October 10, 2014 Thanks , it works Link to comment Share on other sites More sharing options...
shachar Posted February 9, 2015 Share Posted February 9, 2015 Any idea how to do it with JS studio 6.0, it does not have the Parameters button Link to comment Share on other sites More sharing options...
cameron_1 Posted February 9, 2015 Share Posted February 9, 2015 It's in the same location in Jaspersoft Studio 6 as it was in 5.5/5.6. Link to comment Share on other sites More sharing options...
chirag_chaudhari4112 Posted February 7, 2016 Share Posted February 7, 2016 Thanks GURU.............. Lot of Thanks................. Link to comment Share on other sites More sharing options...
catahojda Posted March 10, 2016 Share Posted March 10, 2016 Just what I needed, thanks Link to comment Share on other sites More sharing options...
diegoqueres Posted March 23, 2016 Share Posted March 23, 2016 For do this with charts, make the follow steps: 1) Create new parameter on sub-dataset to receive the value from main dataset of report. Uncheck "Is for prompting" option; 2) On "Chart Wizard" window, click on "Parameters" button to open window to map the parameters: http://community-static.jaspersoft.com/sites/default/files/images/Jaspersoft%20Studio%20Professional_2014-01-21_09-07-38.png Link to comment Share on other sites More sharing options...
thiruna012 Posted August 11, 2016 Share Posted August 11, 2016 Thanks Link to comment Share on other sites More sharing options...
setyo.001 Posted September 9, 2016 Share Posted September 9, 2016 many thanks cameron_1 :D Link to comment Share on other sites More sharing options...
ananyachoubey18 Posted October 20, 2016 Share Posted October 20, 2016 It Worked. Was wondering where I went wrong. Thanks a lot Link to comment Share on other sites More sharing options...
jaime.pegueroles Posted December 21, 2016 Share Posted December 21, 2016 I want to thank you about this hint, i was stock in the same problem...thanks again! Link to comment Share on other sites More sharing options...
jaime.pegueroles Posted December 23, 2016 Share Posted December 23, 2016 Dude, i think you might miss one detail, i add this part to complement your answer. When we are going to add the parameter in the window "Dataset Parameter" a new window comes, in that window we must select the parameter we want to made the relation with the main parameter of the main report, but we must dont forget below there another option "Parameter Expression", we need to add the parameter here to, is mandatory to make this works, so take this part very carefully, hope this can halp to another person. Link to comment Share on other sites More sharing options...
r.okuda Posted January 16, 2017 Share Posted January 16, 2017 thanks a lot Camerron_1!! you are special. Link to comment Share on other sites More sharing options...
jowens_1 Posted March 27, 2018 Share Posted March 27, 2018 I agree with max_max_mir....the best, simplest reply so far. Thank you! Link to comment Share on other sites More sharing options...
bruce_little Posted July 10, 2018 Share Posted July 10, 2018 Wondering if anyone has a solution to this. I have a parameter for "Academic Year" which is a string value of, for example '2017-2018'. This needs to be passed to subdatasets as a string for use in query WHERE clauses. However, it is being "evaluated" when passed so that it resolves as '-1'. I've tried the $P! convention when referencing both the report parameter and the table dataset parameter to no avail. Any suggestions? Link to comment Share on other sites More sharing options...
Vita.Dambe Posted October 7, 2020 Share Posted October 7, 2020 Thanks a lot, saved my life :) 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