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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA - Insert non-query type data providers into BO reports

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hey everyone!
I have been stuck on this problem for a while and urgently need help. Here's the issue:
I have created my own macro and I'm running it in BO 5.1.1.
I have created an instance of a dpVBAInterface as described in the BO SDK Ref Guide.
I basically cut and pasted their code and modified it to fill the columns with the
data I needed:

Code:
Public Sub New_DPVBA(dpInterface As DpVBAInterface)
  Dim oCube As DpVBACube        ' somewhere to put the data
  Dim oColumns As DpVBAColumns  ' the columns in the cube

  [snip]

  ' Define the attributes of the data provider and cube
  [snip]

  ' Fill in the first column in the cube
  [snip]

  ' Fill in the second column in the cube
  [snip]

  ' Call routine to modify the data
  ModifyColumns column1, column2
  
  ' Check to make sure everything’s okay
  dpInterface.CheckDataIntegrity (boCheckAll)
End Sub

Then I try creating the new data provider and creating a new report with it
by calling:

Code:
  Set newDataProvider = ActiveDocument.DataProviders.AddDPVBA("myprog.rea!mycode.New_DPVBA")
  Set newReport = ActiveDocument.Reports.CreateQuickReport(newDataProvider.Name)

The result is that I get an empty report created with no errors. If I click on view data,
all my data is there, in the data provider; I can even insert a table manually and my values
will appear. Thus, my issue boils down to the following problems:

* How come my non-query data provider does not show up in the report, when I have made trivial
query-type data providers appear in the report? Does the fact that my data is not refreshable
play a role?

* How do I make this type of data provider refreshable? It depends on module-wide variables
that only exist while the macro is running. How do I store them for later?

* Is there a way to mimic BO's "Insert Table" command from VBA? All of the objects seem to
be read-only, so I don't know how to insert

I would really appreciate any help you could offer.
Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top