I’m trying to tie up what objects are used in a given set of reports and have so far been successful by referencing the report dataprovider.query.results and then working on the object and the class.
The problem comes when I try to look at the dataprovider.query.conditions. Again I can access the object and the class which gives me the object the conditions is based on. This is fine so far, but I have a number of conditions which are based on other objects (i.e. object 1 (a date) = object 2 (a prompt built into an object to allow for better control over what is passed)).
When I try and retrieve the operand for conditions based on other objects I get a reference number (which I guess is the internal reference number used to identify the object).
My questions therefore is this - does anyone know where in the object model I can tie up this reference number to the object it represents - either in the designer SDK or in the reporter one? OR is there a better way of retrieving the condition structure of a query?
The universe object has a property which appears to be hidden. The ‘id’ property seems to return the internal reference number. However, this is not documented in the SDK documentation, nor does it appear on the list of methods and properties given to you by the VBA editor.
I found this by trial and error but am sure that there must be other hidden properties - does anyone know any way of finding them out?
If you right-click anywhere on the object browser in the VB Editor, you can select “Show hidden members” to see them.
Back to the original issue. I’m afraid with the Reporter object model you simply can’t interrogate the operand of a condition when it is set to another object, is a sub-query, is a result of the calculation wizard, etc. You can only interrogate the operand if it is a constant or prompt. You can confirm this by looking at the available options for the OperandType property. Only “Constant” and “Prompt” are the valid values.
With those limitations in mind, you might like to review the utility posted here. It’s from one of my conference presentations two years ago, and might be exactly what you are looking for.