Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Stored procedure in Birt???
megabri
I want to execute a stored procedure before my report generates, where and how would I do that?
Find more posts tagged with
Comments
bgbaird
If I understand, you want to execute a SP, then have the report initiate?
megabri
<blockquote class='ipsBlockquote' data-author="'bgbaird'" data-cid="107716" data-time="1343764129" data-date="31 July 2012 - 12:48 PM"><p>
If I understand, you want to execute a SP, then have the report initiate?<br /></p></blockquote>
That's correct
bgbaird
You could approach this all within the report.
I might set up two datasets,
DS1(calling the sp and providing a dummy return value)
and DS2, the dataset you really want to use.
In your design, place a data object(obj1), bound to DS1, at the top of the page, and set it's visibility to 0.
Place whatever table, grid, data (obj2)...bound to DS2 below that.
I think "obj1" will fire DS1 before "obj2" fires ds2.
OR...define DS1 to execute your SP, then bind it to a hidden dynamic parameter that accepts the default return from DS1. (this one is a WAG!)
megabri
<blockquote class='ipsBlockquote' data-author="'bgbaird'" data-cid="107740" data-time="1343828704" data-date="01 August 2012 - 06:45 AM"><p>
You could approach this all within the report. <br />
<br />
I might set up two datasets, <br />
DS1(calling the sp and providing a dummy return value) <br />
and DS2, the dataset you really want to use.<br />
<br />
In your design, place a data object(obj1), bound to DS1, at the top of the page, and set it's visibility to 0.<br />
Place whatever table, grid, data (obj2)...bound to DS2 below that.<br />
<br />
I think "obj1" will fire DS1 before "obj2" fires ds2.<br />
<br />
OR...define DS1 to execute your SP, then bind it to a hidden dynamic parameter that accepts the default return from DS1. (this one is a WAG!)<br /></p></blockquote>
Ok, I'll see what I can do with that. I know in actuate when I wanted to execute the stored procedure I'd just put it in one of the start methods of one of the reporting sections. I don't know if I can do the same thing in Birt or not. This is the start method I use to use in Actuate<br />
<br />
<br />
Sub Start( )<br />
Super::Start( )<br />
' Insert your code here<br />
' deptName = getUserSite()<br />
<br />
Dim aConnection as AcDBConnection<br />
Set aConnection = New MROConnection<br />
aConnection.connect()<br />
<br />
<br />
Dim str as String <br />
Dim dbStmt as AcDBStatement <br />
<br />
str = "DECLARE "<br />
str = str & " v_wonum workorder.WONUM%TYPE; "<br />
str = str & " BEGIN "<br />
str = str & " MAXIMO.lirr_rpt_es_brg_ins_proc(p_wonum => '"<br />
str = str & wonum<br />
str = str &"', p_status => ''); "<br />
str = str & " END; "<br />
<br />
Set dbStmt = aConnection.Prepare(str)<br />
dbStmt.Execute()<br />
<br />
End Sub
bgbaird
You might check out Jason's post at:
http://www.eclipse.org/forums/index.php/mv/msg/359682/883126/#msg_883126
megabri
<blockquote class='ipsBlockquote' data-author="'bgbaird'" data-cid="107744" data-time="1343829723" data-date="01 August 2012 - 07:02 AM"><p>
You might check out Jason's post at:<br />
<br />
<a class='bbc_url' href='
http://www.eclipse.org/forums/index.php/mv/msg/359682/883126/#msg_883126'>http://www.eclipse.org/forums/index.php/mv/msg/359682/883126/#msg_883126</a><br
/></p></blockquote>
I'll check it out. Thanks Brian.