kannanmugundan Posted May 25, 2010 Share Posted May 25, 2010 I am using iReport 3.7.2 and i get the above error when I write my sql and retrieve fields.my sql looks like select * from rbapmst_tb where APMST_DLR_NO = $P{dlrNo}I have a parameter dlrNo, but if i replace the parameter with actual value select * from rbapmst_tb where APMST_DLR_NO = 'S1100'It is retrieving all fileds.It is just a simple String type parameter and the data base column is also oracle VARCHAR2 Please help me why the $P{dlrNo} in not able to get the fields.Is this some thing normal in iReport (Please excuse me, if it is already mentioned as i am new to iReport) Thanks Link to comment Share on other sites More sharing options...
rakeshenoch Posted May 26, 2010 Share Posted May 26, 2010 Attach the jrxml for more clarity!!! Link to comment Share on other sites More sharing options...
baggypants Posted May 27, 2010 Share Posted May 27, 2010 Have you tried putting quotes around the parameter. i.e.select * from rbapmst_tb where APMST_DLR_NO = '$P{dlrNo}'Post Edited by baggypants at 05/27/2010 22:52 Link to comment Share on other sites More sharing options...
kannanmugundan Posted May 29, 2010 Author Share Posted May 29, 2010 Hi If I add quotes '$P{dlrNo}' I get the error ORA-01006: bind variable does not exist I am attaching my jrxml file Link to comment Share on other sites More sharing options...
slow Posted May 31, 2010 Share Posted May 31, 2010 "AND APMST_DLR_NO = $P{dlrNo}AND DLORG_DLR_NO = $P{dlrNo}"are you sure APMST_DLR_NO and also DLORG_DLR_NO are varchar ?have you tried select * from rbapmst_tb where DLORG_DLR_NO = 'S1100'?it seems to be a conversion error...with string parameters don't use ''. Link to comment Share on other sites More sharing options...
kannanmugundan Posted May 31, 2010 Author Share Posted May 31, 2010 Hi yes DLORG_DLR_NO is varchar and if I just replace all parameter with actual value/sql It does retrieve the fields I know that I may be doing some silly mistake, but unable to figure it out thanksPost Edited by kannanmugundan at 05/31/2010 16:28 Link to comment Share on other sites More sharing options...
slow Posted June 1, 2010 Share Posted June 1, 2010 have you tried to define parameters with default values and then when prompt for parameter value use the "default value" button?with this test you can try to verify if there is an issue passing basic string value.when you define default values, use:new String("S1100") without '' Link to comment Share on other sites More sharing options...
kannanmugundan Posted June 1, 2010 Author Share Posted June 1, 2010 Hi, I am not running the report, just when editing the SQL I get the above errorPlease see the attached Image. If i just replace it with actual value with single quote, it gets all the fields Hope I made it clear 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