Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Problem with Stored Procedures - Birt
Problem with Stored Procedures - Birt [message #641519] Thu, 25 November 2010 14:28 Go to next message
Fabricio  is currently offline Fabricio
Messages: 3
Registered: November 2010
Junior Member
Hi all,

I have created a stored procedure to fill a temporary table with data that I will use in my report.

So, I created a Stored Procedure Data Set to call my stored procedure, and then another SQL Data Set to retrieve data that was filled by my stored procedure. When I check the "Preview" from Stored Procedure Data Set, the stored procedure is executed and the temporary table is filled correctly. But when I run my report, the stored procedured is not executed and I cant get the data for my report. I need to use the store procedure.

Anyone has a solution to my problem? How I should execute the stored procedure before getting data with a SQL statment?
Re: Problem with Stored Procedures - Birt [message #641883 is a reply to message #641519] Mon, 29 November 2010 00:01 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Do you have two datasets in the report? Datasets in BIRT are not called
if they are not used in a report. Try having the first stored proc
return a value and bind it to a data item at the top of the report and
set its visibility to hide it. This should cause it to run. Then bind
your second dataset to a table below it.

Jason

On 11/25/2010 2:28 PM, Fabricio wrote:
> Hi all,
>
> I have created a stored procedure to fill a temporary table with data
> that I will use in my report.
> So, I created a Stored Procedure Data Set to call my stored procedure,
> and then another SQL Data Set to retrieve data that was filled by my
> stored procedure. When I check the "Preview" from Stored Procedure Data
> Set, the stored procedure is executed and the temporary table is filled
> correctly. But when I run my report, the stored procedured is not
> executed and I cant get the data for my report. I need to use the store
> procedure.
>
> Anyone has a solution to my problem? How I should execute the stored
> procedure before getting data with a SQL statment?


Jason Weathersby

BIRT Exchange
Re: Problem with Stored Procedures - Birt [message #641944 is a reply to message #641519] Mon, 29 November 2010 05:48 Go to previous messageGo to next message
Fabricio  is currently offline Fabricio
Messages: 3
Registered: November 2010
Junior Member
Hi Jason,

Thank you for your reply.

Yes, I have 2 data sets, 1 for the stored procedure and other to query data.

My stored procedure is returning a dummy data, just to force the data set to open, but for same reason I cant put this returned value in the report. In the dataset, it is a output parameter, and I cant drag-and-drop this field in report. So I tried to create a field with value like "outputParams["x"] " or "DataSet1.outputParams["x"] " but did not work. Do you know how to do that?

Thanks again
Re: Problem with Stored Procedures - Birt [message #641963 is a reply to message #641519] Mon, 29 November 2010 06:50 Go to previous message
Fabricio  is currently offline Fabricio
Messages: 3
Registered: November 2010
Junior Member
Hi,

I modified my report and added the output param in the report, now my stored procedure is executing correctly. Thank you Jason.

Regards
Previous Topic:Conditionally hiding report parameters
Next Topic:Graphical Master Page
Goto Forum:
  


Current Time: Sun Apr 20 18:11:07 EDT 2014

Powered by FUDForum. Page generated in 0.02166 seconds