BusinessObjects Board

Adding predefined conditions in VBA

Hi guys,

Does anyone know how to add a predefined condition in Designer VBA or to duplicate and adapt an existing predefined condition?

According to the reference, the usage is:

Function Add(Name As String, [ClassName]) As PredefinedCondition

All nice, but how to implement it practically in a script? An example is welcome.

Thanks in advance!


BoB_RW (BOB member since 2005-12-01)

Partial code for adding a new predefined condition:

Dim Cls As Designer.Class
Dim PreCond As Designer.PredefinedCondition

Set Cls = Univ.Classes.FindClass("Class Name")
Set PreCond = Cls.PredefinedConditions.Add("Condition Name")
PreCond.Where = "SQL statement of the condition"

You can tweak this a bit to copy from another condition, effectively “duplicating” the object.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Dwayne, as always: excellent! Thanx!


BoB_RW (BOB member since 2005-12-01)

Hi Dwayne,

How can I add PredefinedCondition in Desktop Report using SDK


2732829 (BOB member since 2009-03-06)

Take a look at the code in this utility … Copy Data Providers / Copy Report Variables. It includes examples for adding condition objects, and one option is for predefined conditions.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)