jvmolto Posted January 27, 2014 Share Posted January 27, 2014 Hi,with iReport I use the following query without error, but with Jaspersort Studio I get the errors marked in redSELECT $P!{parTabla}.*,almdes (==> mismatched input '.' expecting 'FROM')FROM $P!{parTabla}, almWHERE almcod=almlalm AND $P!{parWhere}ORDER BY $P!{sqlOrden} (==> no viable alternative at input $P!{sqlOrden})How to do this with jaspersoft studio?Thanks in advance Link to comment Share on other sites More sharing options...
bbaley Posted January 28, 2014 Share Posted January 28, 2014 I think $P!{parTabla}.should be $P{parTabla}.(where did the exclamation mark come from?) Link to comment Share on other sites More sharing options...
ilona Posted January 28, 2014 Share Posted January 28, 2014 There has been a change in the syntax. $P{parametername} is the old format and will not correct with null values. (Also, the ! in your SQL query shouldn't be there.)It is best to use the new format: $X{EQUAL,fieldname,parametername}Regards,Ilona Link to comment Share on other sites More sharing options...
Ankur Gupta Posted July 17, 2014 Share Posted July 17, 2014 Hi ilona, I just wanted to ask you about the changes in the new format, regarding the dynamic queries, with this I mean that Earlier for the queries to be dynamic what we did that is that we could store the whole SQL in a format of String as the default expression of the parameter, and then used that parameter in the query as $P!{parameter} Please throw some light on the change in the new version. Any Help is appreciated. Thanks Ankur Gupta Link to comment Share on other sites More sharing options...
Ankur Gupta Posted July 17, 2014 Share Posted July 17, 2014 Hi jvmolto,I have created a video for dynamic queries in the Jasper Soft Studio, and what I noticed is the error which is coming does not affect the output Hope that this helps.ThanksAnkur Guptahttp://ankurthetechie.blogspot.in/ Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted July 18, 2014 Share Posted July 18, 2014 Hi jvmolto,the syntax of your query seems ok, what's the problem with Jaspersoft Studio? If the syntax highlighting suggests an error, you can ignore it, the query should work normally anyway.ThanksGiulio 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