Hi,
I’m having problems adding conditions to a report through OLE (though the problem may well apply to standard scripts too).
I have successfully applied conditions to several objects through code (based on user selections) and these are displayed correctly in the Data | Edit dialog as well.
However I’m now adding some additional conditions which are failing. Or at least when I say fail theres no error but the condition isn’t applied, and furthermore all other conditions are removed.
The particular class/object set up I have is as follow :
Class : Activity
Object : Description
Sub Class : Activity Start
Objects : Activity Start (and several others to form a date hierarchy which includes, year month and quarter).
Now I apply the condition by using the Add method of the Conditions collection. I say
Conditions.Add (“Activity”, “Activity Start”, “Greater than or equal to”, “<>”, “Constant”)
And this causes the probs. No errors, but all conditions are removed. I’ve also noticed that I can say
Conditions.Add (“Foo”, “Activity Start”, “Greater than or equal to”, “<>”, “Constant”)
Where the Foo class doesn’t exist. Again theres no errors, and all conditions are removed. This leads me to two conclusions
a. Theres a bug which isn’t properly generating errors when non-existent classes are referenced in a query. Ideally an error should be displayed, or other indicator that the condition is incorrect. No error message, and complete removal of all conditions isn’t the best behaviour
b. My particular problem is one of referencing - Bus. Obj. doesn’t know which Class | Object combination I’m referring to. I can add a condition to description OK, but not object in the subclass
So I guess my questions are :
a. does anyone have any experience with this problem b. anyone have any idea how to correctly reference a Class | SubClass | Object within an Add call
Help/Comments appreciated.
btw. I’m using Bus. Obj 4.1.1 and am scripting the system through OLE.
Cheers,
L.
======================================================================
“Never do with more what can be achieved with less”
–William of Occam
====================================================================== LEIGH DODDS | 20 Manvers Street | leigh.dodds@dtcg.co.uk
Software Engineer | Bath BA1 1PX | TEL +44 (0)1225 444700
Deloitte Consulting | www.praxis.co.uk |
Listserv Archives (BOB member since 2002-06-25)