Hello All,
I’am new in BusinessObjects, and i nead your help in my little problem.
Please, write me an example, how to create union query with VBA. I know, it sounds a little bit crazy, but i nead it
Scenarios would be such:
User creates and run query in BO.
User press button which calls some procedure.
Called procedure adds new SQL, and connects main SQL with new by union operator.
–
Thanks for your help!
After building the first query, you can then do a DataProv.Queries.Add method to add another tab. I believe the default Qry.Operator is union. Then proceed to build the second tab. You may find some of the code in this utility helpful to sort this out.
Sub MakeUnion()
Dim Doc As Document
Dim DP As DataProvider
Dim DQ As Query
Dim Rez As Result
Set Doc = ActiveDocument
Set DP = Doc.DataProviders(1)
DP.Load
Set DQ = DP.Queries.Add
Set Rez = DQ.Results.Add("ClassName", "ObjectName")
DP.Unload
End Sub