Jump to content
We've recently updated our Privacy Statement, available here ×

Passing Parameters to Oracle through ireport


ktrinad

Recommended Posts

By: arshad - arshadtpt

Passing Parameters to Oracle through ireport

2004-07-30 12:55

Hi All,

I want to know how can we pass a parameter to oracle using

jasper reports.i have given parameter as - '$P!{parameterid}'

and also as $P!{Headerid}.but i am getting error as - Non supported SQL92 token at position 60. so i will be very much greateful if i get a guidence regarding this.

Thanks in advance

arshad

 

 

 

By: Mykel Alvis - evilarchitect

RE: Passing Parameters to Oracle through ireport

2004-07-30 13:50

Sorry. Insufficient data to answer your question.

 

Please be provide more data re: your problem.

The report source might be a good place to start.

 

 

 

By: arshad - arshadtpt

RE: Passing Parameters to Oracle through ireport

2004-07-30 23:51

thanks for ur response.The scenario is, i want to see a report through jasper.for that i am sending a qry to oracle through jasper.the qry here is 'select * from employee where empid='$P!{empid}'.note that my database is in oracle.previously i worked in mysql and there i used to give qry as "select * from employee where empid=$P{empid}. so when i pass the parameter to oracle, while typing the qry(parameter value '$P!{empid}') and giving read fields in jasper report query window, it says 'non supported SQL92 token'.I like to know how we can pass a parameter to oracle through jasper.it will be better if i can get a example qry with parameter passing

Thnaks in advance

arshad

 

 

By: Mykel Alvis - evilarchitect

RE: Passing Parameters to Oracle through irep

2004-07-31 21:13

The correct method (for an integer field) is the

select * from table where id_field = $P!{Integer_parameter}

 

I do that regularly to oracle, hsqldb, mysql and sqlserver2k.

 

That is the correct method. Maybe you have the wrong jdbc driver. Maybe your parameter type isn't set to java.lang.Integer or some other type that renders well with .toString()

 

 

 

 

 

By: arshad - arshadtpt

RE: Passing Parameters to Oracle through ireport

2004-08-01 00:11

Thanks Mykel,

I have got the solution for that now.its due to my jasper version.i have upgraded the newer version and now its working fine.

thanks a lot for ur help

arshad

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...