Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing DataProviders

Status
Not open for further replies.

suzreid

Technical User
Sep 26, 2000
59
0
0
GB
Can a dataprovider in a document, be refreshed from another document?

I have a document that I only want to refresh if I have a record returned in a second document. Is this possible?

Suz
 
In a document, if you have no. of reports, then you can refresh a particular report using macros.
 
I do not think that this is what suz wants to do. If I read it correctly she want to trigger the refresh from a document from another document. This is altogether different from situation between report (= tabs) within ONE document. If at all possible I think you may have to use some VBA to refresh a 2nd document based on the record-count from the first dataprovider. Seems a cumbersome approach (Why not use data directly to create a BO document?)

T. Blom
Information analyst
tbl@shimano-eu.com
 
I'm exploring possibilities at the moment.

I have a document that needs to be refreshed automatically only when an upload to the database has been completed. When the upload is complete there is a record placed in a table in the database.

Unless I can get Broadcast Agent to do a conditional refresh then I figured the best way to do it was to create and schedule a report that looks to see if the data has been uploaded, if it has, refresh the 'real' document and send an eamil to the users to say that the report has been refreshed with the new data.

Any suggestions on a better process will be appreciated.

Suz
 
So, what will you do if the update on the database is completed a minute AFTER the checking first document is run? If at all possible the first document will not return data, so the second document is not triggered. Seems to me you would need a procedure to start the events and the trigger can only be at the database level. What kind of RDBMS are you working with?

T. Blom
Information analyst
tbl@shimano-eu.com
 
I don't quite understand what you are trying to tell me. The underlying database is SQL Server. I can't mess with the database creating new triggers. It is a third party application.

The initial report will count the number of records for a month. If the result is 0 then do nothing, if the result is 1 then refresh the 'real' report and email the users.

The initial report will be run on a nightly basis for the first week of the month. The upload is only done once a month and must be completed before the second week of the month. There will never be more than 1 record in this table for any given month. The front-end application triggers the upload.

There are manual procedures surrounding this process also.

Is this any clearer about what I am trying to do??

Suz
 
Yes, that paints a much clearer picture....
I cannot imagine a solution by using a first document to trigger a second one in this way (but I bet someone :) s.k. will give a definite judgement on this)

However you may get around it by using SQL to get some sort of result.
Suppose you add a pseudocolumn to the report SQL that contains a static '1'.
(Like by adding a database view that contains the extra column) Now join the checking table (that contains either 0 or 1) to the table containing the pseudo-column. Now if the report runs it will keep on returning no data untill the checking table will have a one instead of a zero. (correct data-set is returned, cause checking table has just one record)
I am not using Broadcast Agent , so I do not know if this will give a workable approach..............

T. Blom
Information analyst
tbl@shimano-eu.com
 
You could certainly do this with a script. I don't know how to do it, but there is nothing preventing you from simply executing the script with tells you how much data is returned by a given DP. If it's > 0, then you can open and refresh another document. Or you could have the script then submit the 2nd document to the BCA and distribute it the way you want.

Or, you could have the script create a filewatcher file and have the BCA start executing the job when the file is there.

Steve Krandel
BASE Consulting Group
 
I go with Steve's suggestion. You can check whether the Refresh of the first Document did return any rows using SDK, if so then you can open the Other Document and Refresh it.


Sri
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top