mits13 Posted July 16, 2014 Share Posted July 16, 2014 HiI am using Jaspersoft Studio 5.5. I am getting an error when I try to use conditional query ( $P!{})I create a parameter $P{Qry) with a very simple query - select transaction_date from transaction - of type java.lang.String and Is for Prompting is false.When I go to the Dataset and Query Dialog and put $P!{Qry} it shows an error " missing SELECT at $P!{Qry}"It does not allow me to Read fields or go ahead. I am using Postgres DB but I have also checked on Sample DB - the Language is SQLI have checked on older verision of iReport - this same steps work succesfully there. So i am not sure what the problem is.Is the feature no longer there or has it changed. I tried to locate an answer in the fourms but am unable to get a resolution.Please can you helpThanks and Many Regardsmaithili Link to comment Share on other sites More sharing options...
rajesh.sirsikar Posted July 16, 2014 Share Posted July 16, 2014 Can you attach a screenshot of your Query window??? Link to comment Share on other sites More sharing options...
rajesh.sirsikar Posted July 16, 2014 Share Posted July 16, 2014 Hi Mits13,I have explained a simple way to cretae a Multiselect Parameter in jaspersoft studio here.http://www.rajeshsirsikar.com/?p=272Please let me know If you need more info on the same.Thanks,Rajesh Sirsikar Link to comment Share on other sites More sharing options...
mits13 Posted July 16, 2014 Author Share Posted July 16, 2014 Hi,PFA the screen shot for Query window and also the Parameter expression window./sites/default/files/images/Screenshot1(3).png/sites/default/files/images/Screenshot2.png/sites/default/files/images/Screenshot4.png Link to comment Share on other sites More sharing options...
mits13 Posted July 16, 2014 Author Share Posted July 16, 2014 Hi Rajesh, I went through the link and the steps are excellently explained. But I think its not what i am looking for. I need to change the SQL based on some condition. For this, in the older version iReport, we can specify in a parameter and use the parameter in the Query window for eg. $P!{SQLQuery} But this is not working in Jasper Studio. Do you know why? or an alternative method? Thanks and Regards maithili Link to comment Share on other sites More sharing options...
rajesh.sirsikar Posted July 16, 2014 Share Posted July 16, 2014 Hi Maithili,Thanks for the question. even I hadn't tried this. Now I have and this blog prooves that :)http://www.rajeshsirsikar.com/?p=286Thanks,Rajesh Sirsikar Link to comment Share on other sites More sharing options...
rajesh.sirsikar Posted July 16, 2014 Share Posted July 16, 2014 Hi Maithili,Thanks for the question. even I hadn't tried this. Now I have and this blog prooves that :)http://www.rajeshsirsikar.com/?p=286Thanks,Rajesh Sirsikar Link to comment Share on other sites More sharing options...
mits13 Posted July 16, 2014 Author Share Posted July 16, 2014 Oh wow..that means even if it is showing an error in the query window.. it actually does work. Wow..i missed doing that!! Thanks a lot Rajesh 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