Jump to content

How to send a array parameter (table of numbers) to an pl/sql function?


Recommended Posts

Hi, i'm new in Jasper Report (working for 2 weeks with it). And I have the first problems. I want to a list of numbers to a pl/sql function. The typedef of the argument is: "TYPE colNumbers IS TABLE OF NUMBER(5,0)". In a normal SQL query i call my function with "select (Test.argLoN(colNumbers(1,2,3,4,5,6))) as "asd" from dual". This part works fine.

I read that JR engine call the toString() method of the parameters. So in ireport (the exclipse plugin version) I create a parameter with type String and give him the "default expression" "1, 2, 3, 4, 5, 6, 7, 8, 9, 10". In the query dialog I call the statement: "select (Test.argLoN(colNumbers($P{val})) as "asd" from dual". If I run the report i get this error msg: "net.sf.jasperreports.engine.JRException: Error executing SQL statement for : Test2"

If i understand this right. "select (Test.argLoN(colNumbers($P{val})) as "asd" from dual" with val = "1,2,3,4,5" should create "select (Test.argLoN(colNumbers(1,2,3,4,5))) as "asd" from dual".


Or I missunderstand it. Whatever. Please help me! :)

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...