BusinessObjects Board

Duplicate Data Provider

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 :canada: (BOB member since 2002-08-28)

Hmmm…

All that said, the problem is like resolvable, by handing the domain name off to the AddQueryTechnique Function:

Syntax:


Function AddQueryTechnique(UniverseName As String, [UniverseDomainName As String]) As DataProvider

Existing Code:


Set DataProviderTo = DocumentTo.DataProviders.AddQueryTechnique(DataProviderFrom.UniverseName) 

In that syntax, UniverseDomainName could be read off of the source DP’s universe, resulting in a line of code that reads like this instead:


Set DataProviderTo = DocumentTo.DataProviders.AddQueryTechnique(DataProviderFrom.UniverseName, DataProviderFrom.Universe.DomainName)

That should just about do it.

Regards,

Dan Lelovic


dl_toronto :canada: (BOB member since 2002-08-28)

Thanks … I’ll keep that in mind if the utility is ever updated again.


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

The user managed to get this to work for one report! Others still don’t work. I’m going to try some of the workarounds posted…


Nick Daniels :uk: (BOB member since 2002-08-15)

Hi,

We have migrated last week from 5.1.6 to 5.1.8 and since then all ZABO users can not use the Duplicate Data Provider.
We have tried the old version (from INTEGRA’s site) and the new one (from BOB’s Downloads) - both of them are not working and the following message is returned :


116 : One Dataprovider already loaded 

I have even tried to duplicate a simple query on a new report,which has only one object in the select clause (no conditions etc.)- without success.

Have someone encountered this problem before ? It`s really important!


sharone (BOB member since 2002-10-17)

Interesting. We’ve been looking at 6.x, and haven’t really looked at 5.1.8 at all. I’ll find a place to load 5.1.8 and see if the utility can be fixed. I can’t make any promises on timing though …


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

Thanks Dwayne!

Working on the BO without the add-in seems like moving from WINXP to DOS… :wink:


sharone (BOB member since 2002-10-17)

Hi,
I am trying to use the utility for ZABO 5.1.8 and its giving me error.

  1. one dataprovider is already loaded.

Any solution to this issue. I am in real problem. Need to merge reports but no time…

Thanks,
-Manoj


045331 (BOB member since 2004-01-23)

Hmmm … this is the second time that error has been reported, but only with version 5.1.8 it seems. It had fallen off my radar, but I’ll try to find some time to look at it. I’ll have to find a place to install 5.1.8, so I’m afraid I can’t make any promises on timing.


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

Hi,

I am trying to use the Copy Data Provider utility (thanks Dwayne Hoffpauir, for this great utility). Am on BO v6.1a.

However I got the following message: “Run Tim eError ‘91’. Object variable or With Block variable not set”.

Has anybody experienced this, or got the utility to work on v6.1a?

Thanks.

(Pressing the Debugger button resulted in the showing of the following subroutine:

ErrorHandler:
'remove data providers and form from memory
DataProviderFrom.Unload
DataProviderTo.Unload
Unload CopyDataProviderForm

'display error message
MsgBox "Error " &amp; Err.Number &amp; ":  " &amp; Err.Description, vbExclamation, "Data Provider Copy Error"

End Sub)


Platypus :australia: (BOB member since 2002-10-23)

OK, I finally found some time to look at the problems under V5.1.8 with the copy data provider functionality. The “fix” for Bug No. 1063709 (which I never experienced, but hey) was to simply allow only one data provider to be loaded into memory. The utility has been updated accordingly. Updates were also made to copy the universe domain when creating the new data provider, and to tighten up the error handling.

The updated utility can be found here.


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

I believe we I have experiance a similar problem. When you have more than one data provider (Same result objects different conditions) BO V6.1a links the data providers automatically(not sure about the inner workings of formentioned utility). This may or may not cause the report to crash or create a run-time report error depending on the mood of the puter, wind or stars (in other words it appear to be random). If you manually unlink your data providers this may solve your problems. I would try create more than one data provider in v6.1a without the Copy Data Provider Utility and try using the built in functionality in V 6.1a.

I hope this helps if not just ignore what I wrote :?


mcliffordgoo :us: (BOB member since 2003-02-13)

Dwayne, I tested the utility in v6.1a and it worked. Thanks a million!

mclifford, thanks for your reply. Puter, wind and stars - never heard it said that way - that’s a new perspective for me!


Platypus :australia: (BOB member since 2002-10-23)

Hi,

I download your utility and I have a message :
“Error 40: No rights, cannot work in drill mode”.

I try to import my universe in another name but the result is the same.

My computer is in windows XP. Do you think it’s the cause of the no running utility in my machine? Have you a clue to help me?

Thanks à lot for your response


GIQUEL (BOB member since 2004-11-17)

I haven’t seen that error message before. On the surface it doesn’t make sense because the utility doesn’t touch the report, so I’m not sure how the “drill mode” matters. Can you try creating a data provider by hand in a blank document, and then copying that data provider with the utility as a test? If that fails too, it must be a privileges (Supervisor) issue. If the test works, it must be something “unique” with your individual report.


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

I create a data provider by hand in a blank document, and then copying that data provider with the utility. That fails too. I’m connecting in Supervisor so I have all privileges and I have the same message “Error 40 : …”.

I don’t understand.


GIQUEL (BOB member since 2004-11-17)

Yes, several time, this plugin doesn’t work fine and give strange error messages.

You can try

  • delete local univers, reimport it
  • save the rea for all users or reinstall it
    *… migrate to e6.1 where dp duplication is available and work fine :wink:

bernard timbal :fr: (BOB member since 2003-05-26)

What version of BusObj are you using? Can you try it with a General Supervisor ID to eliminate privileges as the problem?


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

I tried using the utility and it generates an error code 91 -
Run-time error ‘91’: Object variable or with block variable not set which goes to the macro area “Error Handler: DataProviderTo.Unload”. This happens for all my dataproviders/reports. What am I doing wrong?

Thanks
Nile


Nile :us: (BOB member since 2004-02-12)

The error handling is quite basic in the utility. It sounds like it’s masking the real error. Temporarily comment out the line that says “On Error GoTo ErrorHandler” and hopefully that will help you debug the underlying problem.


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