Hey db, thanks for your response. Yes, the main goal here is to import data between two cubes. More specifically, I am trying to pull data from a datatable that is being generated by a function in the finance business rule. This function performs various logical checks on the source data in order to fill in additional columns in the datatable, so, while it might be possible to translate this code into another process, I'd rather not have to re-work all that code. Essentially, I need a way to grab that datatable and make it my source data in the connector BR. It's worth noting that the function that's generating the datatable is being called by a data adapter to bring that data into a BI Viewer component, so I tried executing the method command for the data adapter in the code as well:
Using DbConnApp As DbConnInfo = BRApi.Database.CreateFrameworkDbConnInfo(si)
Dim methodTypeId As XFCommandMethodTypeId = XFCommandMethodType.BusinessRule.Id
Dim methodQuery As String = "{USCG_RP_HelperQueries}{CostEstimateDetailReport}{WFTime=2026, WFScenario=RAP_FY26, WFCube=BudFm}"
Dim resultDataTableName As String = "BudFmData"
Dim dtDataSet As DataSet = BRApi.Database.ExecuteMethodCommand(DbConnApp, methodTypeId, methodQuery, resultDataTableName, Nothing)
BRApi.ErrorLog.LogMessage(si, "DataSet Info: " & dtDataSet.Tables.Count)
Return Nothing 'Because I don't know how to convert a DataSet to a DataTable yet
End Using
But I am getting this error on line 9: Unable to execute Business Rule 'BudFm_BudEx_Connector'. Method type 'BusinessRule' requires an open application. I'm not sure if you've seen this error before, but is this approach also not possible?