Additional Stored Proc Question [message #885249] |
Tue, 12 June 2012 17:21 |
Carlos Ferrer Messages: 18 Registered: July 2009 |
Junior Member |
|
|
I created a dataset with the main sql which will return a rowid.
SElECT rowid
from table
I then create a stored procedure dataset.
The next step is to pass that rowid to that stored procedure():
{call SAPSCH.XXXXXX(?,0,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
How do I bind the 1st question mark of the stored proc to the rowid id obtained from the first sql. Have tried to look for documentation to walk me through but haven't ound samples that actually do it.
Thanks.
|
|
|
Re: Additional Stored Proc Question [message #885908 is a reply to message #885249] |
Wed, 13 June 2012 21:08 |
|
Carlos
The best way to do this is to drag the data set that returns the rowid
onto your report canvas. In the detail row delete the rowid data
element and then drag your stored procedure data set to the detail row.
This will create an inner table. Select the table and in the
properties view select the binding tab and select the parameters button.
You should then be able to bind the first parameter to the outer
table's rowid. The following is an older example but show binding
internal talbes to outer table values.
http://www.eclipse.org/birt/phoenix/examples/reports/birt2.1/subreport/index.php
Jason
On 6/12/2012 1:21 PM, Carlos Ferrer wrote:
> I created a dataset with the main sql which will return a rowid.
> SElECT rowid
> from table
>
> I then create a stored procedure dataset.
> The next step is to pass that rowid to that stored procedure():
> {call SAPSCH.XXXXXX(?,0,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
>
> How do I bind the 1st question mark of the stored proc to the rowid id
> obtained from the first sql. Have tried to look for documentation to
> walk me through but haven't ound samples that actually do it.
>
> Thanks.
|
|
|
|
|
Re: Additional Stored Proc Question [message #886343 is a reply to message #886336] |
Thu, 14 June 2012 18:59 |
|
Does the stored procedure preview in the data set editor?
Jason
On 6/14/2012 2:51 PM, Carlos Ferrer wrote:
> Looking at the created xml I see the following as being flagged:
> <cell id="1182">
> <data id="1213">
> <property name="dataSet">GETLOCSPCall</property>
> <list-property name="paramBindings">
> <structure>
> <property name="paramName">ROWKEY</property>
> <simple-property-list name="expression">
> <value type="javascript">row["XREF_OIMS_SID_NO"]</value>
> </simple-property-list>
> </structure>
> </list-property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">UNITOFASGN</property>
> <expression name="expression"
> type="javascript">outputParams["UNITOFASGN"]</expression>
> <property name="dataType">string</property>
> </structure>
> </list-property>
> <property name="resultSetColumn">UNITOFASGN</property>
> </data>
> </cell>
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04848 seconds