I found some code here that states it was working, but being a novice, I am likely not doing this right.
I have a UD Form and have a button. I copied the Event Wizard and now have reduced to 1 error on compile.
Compiling Custom Code … Line 71 is highlighted
----------errors------------
Error: BC30002 - line 71 (273) - Type ‘DynamicQueryAdapter’ is not defined.
** Compile Failed. **
Private Sub btnGenerateCsv_Click(ByVal sender As Object, ByVal args As System.EventArgs)
' ** Place Event Handling Code Here **
Try
’ Declare and Initialize EpiDataView Variables
’ Declare and create an instance of the Adapter.
'Line 71
Dim adapterDynamicQuery As DynamicQueryAdapter = New DynamicQueryAdapter(Me.oTrans)
adapterDynamicQuery.BOConnect
’ Declare and Initialize Variables
dim strBAQName as string
Dim result As Boolean
Dim pbSuccess As System.Boolean
strBAQName = “CCI-CommercialAP”
’ Get the ID of BAQ that you wish to work with
adapterDynamicQuery.GetQueryByID(strBAQName)
result = adapterDynamicQuery.Export(adapterDynamicQuery.RuntimeQuery,“\CCCAEPI01\Downloads\CommercialAP”, “csv”, “,”, false, pbSuccess)
’ Cleanup Adapter Reference
adapterDynamicQuery.Dispose
Catch ex As System.Exception
ExceptionBox.Show(ex)
End Try
End Sub