BusinessObjects Board

Lists of objects used - how to include condition objects

I found this VBA code from Dave Rathbun very useful: List Objects Used in a set of Documents

Now, I am wondering is it possible to include condition objects as well and flag them as condition objects? Any pointers, help, etc. would be helpful, because I am no VBA guy at all.


Andreas :de: (BOB member since 2002-06-20)

Hi Andreas,
do you want get the list of condition objects through sdk
what do you mean flag them.

The following code will give you the list of condition object in your report

Sub Get_List_Conditional_object
Dim dp As DataProvider
Dim qy As Query
Dim con As Condition
Dim i, j, k As Integer
Dim test1 As String

For i = 1 To Application.ActiveDocument.DataProviders.Count
  Set dp = Application.ActiveDocument.DataProviders.Item(i)
  For j = 1 To dp.Queries.Count
    Set qy = dp.Queries.Item(j)
    test1 = ""
    For k = 1 To qy.Conditions.Count
        Set con = qy.Conditions.Item(k)
        test1 = test1 & con.Object & vbCrLf
    Next k
    MsgBox test1
  Next j
Next i
End Sub

For include condition or pre-defined
con.Add("class_name","object_name",operator,value)
or
con.Add("class_name","predefined_condition_name")

Hope it would help :idea:


Shahubar Sadiq :india: (BOB member since 2003-02-28)