Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Executing a stored procedure using javascript event handler
Executing a stored procedure using javascript event handler [message #364726] Tue, 19 August 2008 15:30 Go to next message
Babu Kumar is currently offline Babu KumarFriend
Messages: 6
Registered: July 2009
Junior Member
Hi,

I trying to develop a library for our reports development and I have a
requirement of calling a stored procedure before the execution of the SQL
Query. How can I achive this?

Is it possible to get the underlying connection of the datasource so that
I can execute the Stored procedure in the afteropen event of the
datasource?
Re: Executing a stored procedure using javascript event handler [message #364735 is a reply to message #364726] Tue, 19 August 2008 22:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Babi,

If you need the specific connection then your best best is to write a
driver bridge plugin. You can get the connection object and make your
call before the default driver calls your dataset. Take a look at this
blog entry:
http://birtworld.blogspot.com/2007/01/birt-connection-poolin g-continued.html
Your requirement is not connection pooling but the article(s) cover the
driver bridge extension.

Jason

Babu Kumar wrote:
> Hi,
>
> I trying to develop a library for our reports development and I have a
> requirement of calling a stored procedure before the execution of the
> SQL Query. How can I achive this?
>
> Is it possible to get the underlying connection of the datasource so
> that I can execute the Stored procedure in the afteropen event of the
> datasource?
>
>
Re: Executing a stored procedure using javascript event handler [message #655541 is a reply to message #364735] Mon, 21 February 2011 16:33 Go to previous messageGo to next message
Athul Shetty is currently offline Athul ShettyFriend
Messages: 2
Registered: February 2011
Junior Member
Hi Jason,

Could you please explain in detail...we dont want to use connection pooling but want to use connection which is created by the report data source; curretly using only BIRT viewer to generate the report (wont use command line report engine also).

I have posted similar question in birt-exchange also.

I have below requirement:

1) Have stored procedure testrun(in number) and it will insert into temp table
2) Design the report to show the data in temp table
3) Create the data set like select * from temp table

Question:

How can I call stored procedure before the execution of data set? I am currently using "beforeOpen" method to customize the select query but NOT finding the way to execute the stored procedure.

Here select and stoted procedure execution should be seperate; its the requirement.

Could you please help on this?

Thanks in advance,

Regards,
Athul Shetty

Re: Executing a stored procedure using javascript event handler [message #655566 is a reply to message #655541] Mon, 21 February 2011 18:52 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Athul,

I am not exactly sure what you are trying to do, but if you want a
stored proc to run before your standard dataset, create one datasource,
then one dataset that calls the proc and one dataset that reads from the
table. Bind a hidden table at the top of the report to stored proc data
set first. Below it bind your second dataset to the second dataset.

Jason

On 2/21/2011 11:33 AM, Athul Shetty wrote:
> Hi Jason,
>
> Could you please explain in detail...we dont want to use connection
> pooling but want to use connection which is created by the report data
> source; curretly using only BIRT viewer to generate the report (wont use
> command line report engine also).
>
> I have posted similar question in birt-exchange also.
>
> I have below requirement:
>
> 1) Have stored procedure testrun(in number) and it will insert into temp
> table
> 2) Design the report to show the data in temp table
> 3) Create the data set like select * from temp table
>
> Question:
>
> How can I call stored procedure before the execution of data set? I am
> currently using "beforeOpen" method to customize the select query but
> NOT finding the way to execute the stored procedure.
>
> Here select and stoted procedure execution should be seperate; its the
> requirement.
>
> Could you please help on this?
>
> Thanks in advance,
>
> Regards,
> Athul Shetty
>
Previous Topic:pie chart
Next Topic:Howto create a Timedimension
Goto Forum:
  


Current Time: Fri Apr 19 18:48:28 GMT 2024

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

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

Back to the top