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

0

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! :)

ladidadadu's picture
Joined: Feb 14 2014 - 2:33am
Last seen: 5 years 10 months ago

0 Answers:

No answers yet
Feedback