Dwayne,
Great utility. Here is a resolution to an error that could be commonly experienced.
If a user is experiencing this error:
Run-time error '91':
Object variable or With block variable not set
It may be generated from the Data Provider Unload line in the ErrorHandling here:
ErrorHandler:
'remove data providers and form from memory
DataProviderFrom.Unload
DataProviderTo.Unload <----- This is generating the error
The real reason this error is experienced is due to an error being generated in the ErrorHandler code, which obscures the real error that moved execution to this code block in the first place.
In my case, the error was generated on the line:
Set DataProviderTo = DocumentTo.DataProviders.AddQueryTechnique(DataProviderFrom.UniverseName)
and the real error is:
Error 114: Multiple Universe, Select a Repository
The secondary error is only occurring because DataProviderTo never gets assigned to the newly created DataProvider due to the inability of AddQueryTechnique to figure out which copy of a universe to use.
This could be for a couple of different reasons. According to a BO resolution, this is because a user has multiple copies of the universe on their hard drive that the data provider is being generated against.
BO’s resolution link is here:
http://www.techsupport.businessobjects.com/search/Beta/Viewtechresdb.asp?Cmd=View&Level=0&Item=0&ID=9754
In my experience and testing, it was not that, but seems related to the existence of more than one Universe domain in the repository, each holding a universe with the same name. (Name, not filename).
My resolution:
1. Import universe in question in Designer
2. Rename it (File->Parameters)
3. Save with dif filename
4. Point DPs in source doc to newly renamed universe
5. Run utility
6. Switch DPs back over to original universe
Of course, you could eliminate one of the duplicately-named copies of a universe in a different universe domain (i.e. “MyUni” in “UniverseQA” could be deleted, leaving “MyUni” in “UniverseProd” present). I did not test that for fear of breaking production reports that are mistakenly based on the copy of the universe in QA instead of Production (not sure if things would break, but seems likely).
Just an FYI for all trying to resolve this type of issue. Further, in my own testing, this affected my ability to use other DP-copy utilities.
Dan Lelovic
dl_toronto (BOB member since 2002-08-28)