Gaby38 Posted May 1, 2010 Share Posted May 1, 2010 Hi,I use in a query a parameter $P{CLSH} wich is got at execution time from a single select list Input Control.One of the possible content of this parameter is :substr(lib_nom_lie,1,decode(instr(lib_nom_lie,'('),0,length(lib_nom_lie)+1,instr(lib_nom_lie,'('))-1)(that allows me to change the grouping level of the query by playing with the part of the field "lib_nom_lie" taken into account)I use it in the query as follows :select $P!{CLSH} .........Till now no problem : this was working fine.Since the 3.7.1 Jasperserver release, when I select the parameter input of the list corresponding to the value listed above, nothing happens : no error, but I remain on the parameter window. If I select another value for the parameter in the list, all is OK. If I test my query with this value outside Jasperserver on the same database (with sqldevelopper) , all is working well with the right results.I tried to change the value by deleting the single quotes inside the parameter :"substr(lib_nom_lie,1,decode(instr(lib_nom_lie,(),0,length(lib_nom_lie)+1,instr(lib_nom_lie,())-1)"Of course this is crazy from sql point of view but if I click on "OK", then jasperserver launches my query and I get an "SQL execution error" that is normal according to my modification.So, it seems that something has changed with the new release of Jasperserver in the parsing of the input parameters ( introduction of cascading input controls??).Can anybody help me to fix this point : how to escape the single quotes in a parameter in Jasper. I tried with antislash. I tried also to put "\Q')'\E (found in the net). But nothing worked.Thanks for any suggestionGaby Link to comment Share on other sites More sharing options...
Gaby38 Posted May 1, 2010 Author Share Posted May 1, 2010 More Info,In fact, when I said it was not working when I tried to escape the single quote with a backslash, I was wrong : jasperserver launched the report but there was a SQLM execution error. When I write \')\' in the input controljasperserver accepts and launches the report but I get " \')\' " inside the parameter value. So I have to eliminate the backslah caracters with a ".replace("\\","").I have tested and it works. So in my report I have a first parameter which maps the input control, and I have another parameter to be used in the query which has as default value the first parameter.replace("\\","").It works fine.But perhaps have you a smarter method ??So thanks for your future suggestions.Gaby Link to comment Share on other sites More sharing options...
lucianc Posted May 4, 2010 Share Posted May 4, 2010 This has been fixed after the JS CE 3.7.0 release. See the changes in rev. 16755 at http://jasperforge.org/scm/viewvc.php/branches/js-for-pro-3.7.x/jasperserver-war/src/main/webapp/WEB-INF/jsp/DefaultParametersForm.jsp?root=jasperserver&r1=16882&view=logYou can merge the changes to your version of the file.Regards,Lucian Link to comment Share on other sites More sharing options...
Gaby38 Posted May 4, 2010 Author Share Posted May 4, 2010 I downloaded from your link the new jsp file for the parameter window and it is now working as before.Thanks a lot Lucian Link to comment Share on other sites More sharing options...
tmochan Posted July 14, 2010 Share Posted July 14, 2010 Is this likely to work in the CE version? I have downloaded and copied the file in the place of the original, and it broke the whole server! Do I need something else? What am I missing? Your help much appreciated. Link to comment Share on other sites More sharing options...
Gaby38 Posted July 14, 2010 Author Share Posted July 14, 2010 Hello,I use jasperserver CE. So when I wrote that I downloaded and that was working fine, it was with jasperserver CE..As far as I remember there was no special thing to take care of. Link to comment Share on other sites More sharing options...
tmochan Posted July 15, 2010 Share Posted July 15, 2010 Just to clarify,You are running JasperServer CE 3.7.0 ?You downloaded "DefaultParametersForm.jsp"and put it in \apache-tomcat\webapps\jasperserver\WEB-INF\jspAnything else? Link to comment Share on other sites More sharing options...
Gaby38 Posted July 15, 2010 Author Share Posted July 15, 2010 Yes,The original size of "DefaultParametersForm.jsp" is 22150 and the size of the new downloaded is 22839.Since the download, all has become as previous. I forgot : you have to restart jasperserverPost Edited by Gaby38 at 07/15/2010 20:26 Link to comment Share on other sites More sharing options...
tmochan Posted July 16, 2010 Share Posted July 16, 2010 Have done that and experimented a bit more ... the three options in "Controls Layout" for each report are : Pop-Up Window Seperate Page Top of PageI would normally have used "Top of Page", as I adjust and rerun reports using the web interface regularly.Having now successfully installed the fix that was mentioned by Lucian (thanks), and also updates to ReportTopInputControls.jsp (2,937kb) ReportTopParametersForm.jsp (25,027Kb) FillParams.jsp (4,294Kb) ViewReport.jsp (8,226Kb) ViewReportControlsDialog.jsp (5,683Kb) DefaultParametersForm.jsp (22,839Kb)After these updates, I checked with each of the methods in turn, and only the "Seperate Page" works when I have apostrophes in the parameters. "Pop up window" and "Top of Page" both don't - still!Any ideas? Link to comment Share on other sites More sharing options...
tmochan Posted July 16, 2010 Share Posted July 16, 2010 I take that back (slightly)."Pop Up Window" now works, but my preferred "Top of Page" still doesn't!!! Also found and installed a newer version of DefaultParametersForm.jsp (29,251Kb)Post Edited by tmochan at 07/16/2010 11:05 Link to comment Share on other sites More sharing options...
lucianc Posted July 16, 2010 Share Posted July 16, 2010 tmochanWrote: "Pop Up Window" now works, but my preferred "Top of Page" still doesn't!!! Log a bug for that, we'll have to look into it.Regards,Lucian Link to comment Share on other sites More sharing options...
tmochan Posted July 16, 2010 Share Posted July 16, 2010 Reported as bug ...http://jasperforge.org/projects/jasperserver/tracker/view.php?id=4781 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