coderb Posted September 11, 2008 Share Posted September 11, 2008 Hi All,I'm trying to define an Input control for my report. my report sql includes a parameter like this:...where tblads.deal_no $P!{mydeal}I've defined mydeal as a stringwhen I run this is IReport I enter the Parameter value I enter at run time for mydeal is : LIKE 'G%' this works in Ireport return all rows where deal_no starts with the letter GOkay, so now I want to run the report on JasperSever, but need to create the Input control to handle this parameter.I defined the mydeal input control as a Single select List of Values (radio)The each list itemis label : G Deals value: LIKE 'G%'label : non G Deals value: NOT LIKE 'G%' Unfortunately this returns an SQL error when run on jasper server, and I though it has something to do with the quotes.So I tried value: " LIKE 'G%' "and value: LIKE "G%"and value: LIKE 'G%'and other the variations of the above.. but still I get a syntax error. AM LOST.Can someome please help me? Link to comment Share on other sites More sharing options...
coderb Posted September 12, 2008 Author Share Posted September 12, 2008 If you can get past all the typos, can anyone help me here? Please... Link to comment Share on other sites More sharing options...
anandharaj Posted September 12, 2008 Share Posted September 12, 2008 Hi, Actually last time i also wanted to do something like this, but no luck. I'll try in this JS 3, and let you know the outcome. Link to comment Share on other sites More sharing options...
coderb Posted September 12, 2008 Author Share Posted September 12, 2008 thanks Raj, appreciate the quick response and help Link to comment Share on other sites More sharing options...
lucianc Posted September 17, 2008 Share Posted September 17, 2008 Does it work if you create a simple input controls (one that results in a text input box) instead of a list-of-values input control, and manually type the query fragment?Regards,Lucian Link to comment Share on other sites More sharing options...
gabrielinux Posted September 18, 2008 Share Posted September 18, 2008 I'm not sure if this helps, but just in case....http://blog-gabriel.mongefranco.com/2008/07/csv-and-wildcard-searches-in.html Link to comment Share on other sites More sharing options...
lucianc Posted September 19, 2008 Share Posted September 19, 2008 coderbWrote: label : G Deals value: LIKE 'G%' label : non G Deals value: NOT LIKE 'G%' Unfortunately this returns an SQL error when run on jasper server, and I though it has something to do with the quotes. Which JasperServer version are you using? I've tried this in JS 3.0 and it worked fine. Also, what browser are you using?To debug this a little, could you edit jasperserver/WEB-INF/log4j.properties, and insert alog4j.logger.net.sf.jasperreports.engine.query.JRJdbcQueryExecuter=debugline into it? This would make JasperReports log the query that it executes, so we'll see what value is used for the parameter.Regards,Lucian 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