Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using MultiInputFilter in Actuate 5.0

Status
Not open for further replies.

actuate2004

Programmer
Jun 27, 2004
4
US
Hi,

I have created common connection and two datasource using Multiinput filter. Created Iterator and AcDataAdapter variables in MultiInputFilter Component.

In the output file i am able to view the data from datasource1 but data from the second datasource it's not visible in the output.

Could any one help on this.

Thanks In Advance


 
Are you using one connection control, or two -- one for each data source? Sometimes the data base you use will determine this, as SQL Server sometimes will require two connections.


Bill
 
DoH! As I was re-reading your first post it stuck out that you did indeed specify one connection; sorry.

Can you explain a little more what it is you're attempting to do? And, have you set any break points to step thru to make sure the second query is returning data? If you're merging the two together, you may need to take a different route. If you're simply returning set 1 followed by set 2, you may not need a MIF and can just use a sequential section instead.


Bill
 
Thanks for your information.


I am trying to merge data from two different data sources. Also i have created common datarow under MultipleInput filter.
 
I imagine you're following Actuate's example report then, since you're using iterator? I rarely, if ever, use the iterator methodology when using the MIF.

This is what my Fetch of the MIF looks like:

Function Fetch( ) As AcDataRow
'Set Fetch = Super::Fetch( )
' Insert your code here

' Declare rows to manipulate data
Dim row1 As dr1 'your first datarow name
Dim row2 As dr2 'your second datarow name
Dim aRow As drMIF 'the merged row

' Declare adapters for each query
Dim Adapt1 As ds1 'your first data source name
Dim Adapt2 As ds2 'your second data source name

' If we are at the beginning, prepare the adapters
If Adapt1 Is Nothing Then
Set Adapt1 = InputAdapters.GetAt(1)
End If

If Adapt2 Is Nothing Then
Set Adapt2 = InputAdapters.GetAt(2)
End If

' Fetch data for each row
Set row1 = Adapt1.Fetch()
Set row2 = Adapt2.Fetch()

If row1 Is Nothing and row2 Is Nothing Then
Exit function
End If

' Get the data from the first query to the MIF row
If Not row1 is Nothing Then
aRow.CoName = row1.GetValue("companyName")
.
.
.'do for all fields of the first data source

' Get the data from the second query to the MIF row
If Not row2 is Nothing Then
aRow.Name1 = row2.GetValue("Name1")
.
.
.'do for all fields of the second data source

Set Fetch = aRow

End Function


Then, if you need more complex logic, build it in. It gets more complex when you need to match the two rows based on some field's value, or if you need to eliminate duplicate records; then you have to have a static SavedDataRow to hold the record to compare against.


Hope this helps.

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top