When you update a select statement through Designer (manually), the Tables… change accordingly. As you’ve discovered, that’s not the case through the SDK. You have to update it yourself in a separate step. Also note that there can be more than one table associated with an object.
I had the same problem as BMTS. As mentioned by Dwayne I solved it using this code:
On Error Resume Next
For tblitemcnt = 0 To obj.Tables.Count
obj.Tables(1).Delete
Next
On Error GoTo 0
obj.Tables.Add class.Name
obj is the actual object and class name is the table used in the select statement for the object, so you need to change this accoding to your needs (assuming your class names are not the table names as they are in my development universe…
The on error statment was used for quick and dirty…
Dwayne, nice script! I have found this very helpful. But I have a few questions:
How is it that I can open a derived universe using this script and modify object names/descriptions of a core universe? Is this a hole in the SDK? I believe in Designer, the classes and objects from the core universes are greyed out so you can’t modify them (but you can with this script!). Is there a way to tell which classes/objects are from the core universes and which are native only to the derived universe?
Additionally, where can I find a list of hidden properties (like Id) as mentioned by you in this message?
I haven’t confirmed this, but if you can edit linked items with the SDK, I’d say it is a bug. I wonder what happens when a core universe changes. I’m guessing the “SDK modifications” would be lost.
To my knowledge, no. The lack of answer to your other post asking the same thing would be pretty good confirmation of that fact.
In the Object Browser, right-click and select “Show hidden members.”
You are correct. Although you can use that script to make name/description changes to core universe objects inside a linked universe, these changes won’t remain if the core universe changes. In fact if you export the linked universe (with the changes) to the repository and then re-import it, the changes are gone as well. I would still agree it’s a bug in the SDK.
Sigh…I was afraid of that.
Great, thank you. And again thanks for the script.
If I run this script and make changes to an object name and description I can save the universe and export it to the repository and the change exists just fine. If I now create new reports based off of this universe I can see the changed object name and description.
However, I seem to be having trouble getting these object changes to show up in existing reports. Is there something I have to do to get these changes to propagate to existing reports?
There’s a counter that gets incremented when you export a universe – that then gets detected, and forces a download of the refreshed universe on a given workstation.
If you modify the universe in the way you did it – that counter doesn’t get incremented.
So – try reimporting the universe in Designer, and then re-export it. Maybe even re-export it twice. Exporting twice will circumvent some logic that looks for changes, and really forces a complete re-import of the universe when everyone next uses it.
You’re quite welcome. The utility is rather bare bones though, and doesn’t have a “move” function, or any ability to create new objects. It could be done … kinda. The “move” would have to be an add / delete, and that would mess up any existing reports … I think.
This is great!! It worked for BO XI R1. All I had to change was - In VB -> Tools -> References, remove MISSING BO Designer 5.x Object Library and check the box for Business Objects Designer 11.0 Object Library. And as suggested replace .loginAs with .LoginDialog at two places; save the changes.
Here is the sequence that I had to follow
Open the Designer, sign in
Run GetInfo macro. It prompts you to login again.
Opens a dialog box to select/open .unv file; it then opens selected universe and populates the excel with object names
For testing, you may want to copy the object names into description and save the excel
If Designer is closed; relaunch and sign-in
Run MakeChanges macro from Excel
Designer login dialog prompts you to sign-in and select/open the .unv
It makes changes to description and asks whether you want to save he changes - say yes.
I’m running BO XI R1… tried the code with the minor adjustments suggested yet I get a run time error ‘30’ basically highlighting ‘DesignerApp.Visible = True’
I am using XI Rel2 . I tried to use the excel workbook to mass update the object descriptions. Even though it is working on one of our machines which has BO 6.5 , it is not working on the machine where we have BO XI Rel2.
I have changed the following : Removed MISSING BO Designer 5.x Object Library and check the box for Business Objects Designer 11.5 Object Library
It throws an error when i try to run the macro: “The LoginAs method has been deprecated. Please use one of the new login methods”.
Any suggestions ? Attached is the download for you reference.
Sanjit
Got the answer of my own question : change Call DesignerApp.Login to
Call DesignerApp.LogonDialog
which means that you need to change the macro in your version. Replace all lines where it says DesignerApp.Login with DesignerApp.LogonDialog
I don’t have XI R2 but according to the docs that should be all that is required.
There is a later version of the macro here which has more functionality:
I have patched my version and will submit it to BOB Uploads today to replace my updated version. for the moment I have attached a copy but the latest version will always be avaiable via BOB downloads.
This is a great utility, but have anybody’s clients raised concerns about security issues of using macros on one of their servers? Is there any clever way to restrict people from ever editing the existing macros or creating new ones? What are some ways, other than just password-protecting the worksheet, that security can be increased without limiting the functionality of this utility? Thanks.