urwithsibs Posted August 6, 2007 Share Posted August 6, 2007 1) I am using a parameter called $P{Term} for the main report query.My sql expression is:SELECT term, gender_name FROM tableWHERE term = $P{Term}GROUP BY term, gender_name2) I am using multiple cross tabs and would like to use subdatasets. I need to pass the same parameter($P{Term}) to the subdataset. I am not sure how do I do that ?.My sql expression for the subdataset is: SELECT term, class_levelFROM tableWHERE term = $P{Term} ANDclass_level ='X'GROUP BY term, class_level Note: I tried to add the parameter)$P{Term}) to the cross tab by..a) right clicking on the crosstab b) cross tab propertiesc) under sub dataset properties > parameters tabd) clicked on adde) selected $P{Term} as default expression and name 'term' But it does not recognize the parameter....says unknown parameter 'term'Please help me on this. Thanks in advance Link to comment Share on other sites More sharing options...
nittu02 Posted August 9, 2007 Share Posted August 9, 2007 In the subdataset that you created, make sure that you have created a parameter with the same name as the one you intend to use in the main report. in your case it will be term. and then, with the procedures that u have already described, you should be able to do it. Link to comment Share on other sites More sharing options...
urwithsibs Posted August 9, 2007 Author Share Posted August 9, 2007 Thanks so much. It worked. :laugh: Link to comment Share on other sites More sharing options...
kunkasurendra Posted March 18, 2008 Share Posted March 18, 2008 Hi, Here i am also facng the same problem. I have created a report using subdatasets. I am not able to display the subdataset fields in the main report. If you have done,please give me the solution,or send me one simple and sample example which you have done. I am attaching my JRXML file. Please find the attachment. Thanks in Advance,Surendra. [file name=SubdatasetsExample.jrxml size=3044]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/SubdatasetsExample.jrxml[/file] Link to comment Share on other sites More sharing options...
svenn Posted March 18, 2008 Share Posted March 18, 2008 kunkasurendra you can only use subdatasets in charts and crosstab elements. If you need to execute mutiple queries to populate your bands then you will have to use subreports. Link to comment Share on other sites More sharing options...
matei Posted March 18, 2008 Share Posted March 18, 2008 don't forget to place those parameters in Parameters List in subdataset and in chart also.;) Post edited by: matei, at: 2008/03/18 17:22 Link to comment Share on other sites More sharing options...
matei Posted March 18, 2008 Share Posted March 18, 2008 i'm not sure is working because i also tried but when is runging those parametres are nulls and is runing but not corect. :( Link to comment Share on other sites More sharing options...
kunkasurendra Posted March 19, 2008 Share Posted March 19, 2008 Thnaks for the help. I had some doubt on that.now it's clarified. Means : subdata sets is used for charts and crosstabs. Is it right? Link to comment Share on other sites More sharing options...
sumeet_singh Posted April 10, 2008 Share Posted April 10, 2008 I have a question regarding sub-datasets. I am new to the Jasper reports and working on the integration with myu application. The Fill manager requires either a JRResultSetDataSource or a connection datasource to be passed to it. However this is only for the main report. My question is how do I pass a JRResultSetDataSource to the subdataset for the chart. The chart that I want to display comes from a different query? Is it possible? I do not want to put in the query in the jrxml file for it to get the data. Please help. Thanks,Sumeet 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