Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Call Oracle Function from Eclipse BIRT (2.6.1)(How to Call Oracle Function With User Defined Parameter Type in Eclipse BIRT 2.6.1)
Call Oracle Function from Eclipse BIRT (2.6.1) [message #872465] Wed, 16 May 2012 07:20 Go to next message
biji Missing name is currently offline biji Missing nameFriend
Messages: 1
Registered: May 2012
Junior Member
Hi
I am using Eclipse BIRT 2.6.1 version.
I can call Oracle function in Eclipse Birt by creating a dataSet like

{? = call CASE MICCCSTARICWNOM.GetTariffText(?,?,?,?,?,?,?,?,?) WHEN TRUE THEN 1 ELSE 0 END}

But my problem is how to pass the user defined parameter Type to this function call (My Oracle function has Strcture Type as the parameter Type for this fucntion).
In BIRT, the different paramter Type which i can pass only String, Integer, Java Object, Decimal..

Anybody tried a kind of this scenario in your BIRT development?
Expecting Help :-).
Re: Call Oracle Function from Eclipse BIRT (2.6.1) [message #900942 is a reply to message #872465] Thu, 09 August 2012 07:43 Go to previous message
Henning von Bargen is currently offline Henning von BargenFriend
Messages: 23
Registered: May 2011
Junior Member
It's not a BIRT problem.
With JDBC you cannot use user-defined types (with reasonable effort).

Thus you have to create a PL/SQL wrapper function. It's simple.

For example, assume your complex type T is a record with a string and a date and you want to call a function F with expects an input parameter of type T.
You could create a wrapper function
Create_T (pi_text in varchar2, pi_dat in date) return T;

and then call
F (Create_T (?, ?)) 
from BIRT
or maybe (I tend to avoid Client variables of type DATE, using a string representation on the client side) call
F (Create_T (to_date(?, 'DD.MM.YYYY HH24:MI:SS'), ?))

Things are more complicated if you want to SELECT complex types. This is not directly possible. You could try to use something like
with 
base_query as (
  select X -- where X is a type, say T
  , Y
  , ...
  from ...
  where ...
)
select
  X.TEXT
, X.DAT
, Y
, ...
from base_query

Previous Topic:Reg dynamic parameter
Next Topic:renderTask images not found when rendering pdf
Goto Forum:
  


Current Time: Wed Apr 24 14:28:40 GMT 2024

Powered by FUDForum. Page generated in 0.03149 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top