BusinessObjects Board

AfterRefresh and No Data To Fetch

I have a VB project that calls BO. I must set the application to interactive and perform a refresh to get the BO variable prompting form to appear for the user to fill in. I am getting the “No Data To Fetch” message after the user presses the OK button on the form and using the AfterRefresh event happens after this message is displayed. Is there a way to trap this message before it is displayed when the application is set to interactive and the document is refreshed?


George R

GRippeto (BOB member since 2005-11-22)

Welcome to B:bob:B!

While it doesn’t address your problem specifically, please take a look at this FAQ entry for some alternative approaches.

Additionally, it is possible to accomplish what you are after, but not easily. One approach is to replace the prompt dialog box with you own VBA userform. The trick there is to populate the VBA userform, which is not a trivial task if you really want values from the database to use in the picklist.

Another approach (the one that most closely meets your need) involves creating another data provider whose sole purpose is to retrieve the prompted value. Ideally you would create this simple data provider against a dimension table so that it runs quickly. What gets returned doesn’t matter. The point is to use the prompt in that second data provider.

Here is where the magic happens. In the BeforeRefresh event, refresh ONLY this one data provider. The prompt will appear normally. Then set Application.Interactive = False and proceed with the general refresh. The previously provided prompt value will be used, and any “No data to fetch” message will be suppressed.

Hopefully this will give you some ideas to nudge you in the right direction. Let us know, if you need any additional help.

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

Ah, Hoffpauir… you are a clever boy… :smiley:

dirmiger :us: (BOB member since 2002-08-28)

Thanks! I will admit though that most of the stuff I come up with was born of necessity. This is actually a technique we use in some of our reports.

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