BusinessObjects: DocumentPartiallyRefreshed function

When developing a Business Objects or Web Intelligence report, how many of you can honestly put your hands up and state that you make use of the DocumentPartiallyRefreshed function? If I were a betting man, I’d bet that very few. Certainly on all the client sites I have worked at, I haven’t seen it used.

The DocumentPartiallyRefreshed function, is in fact a very handy function to incorporate into the cover page of any report you produce for end users. Why?

Well, for seasoned report developers, should a document not refresh fully, we would note a tiny yellow flashing icon in the bottom toolbar indicating a partial refresh. But it could very easily escape your attention. And I’m not sure many end users would recognise what it meant.

The danger of partially refreshed document is that action is taken by the business based on information held in that partially refreshed report.

“Yikes…our report is showing we only have 100 widgets left and we need to order more in for the weekend”. In fact, stock is showing over 1000 widgets in stock.

A trivial example, but you get what I mean.

So my tip for today is to add a cell to the cover page of your report (you do create cover pages don’t you? – maybe a future post).

The DocumentPartiallyRefreshed function is a boolean function which will return a 1 or a 0 (true or false) when the report is refreshed. If the report is partially refreshed, your value will be 1.

You can create a variable that wraps the DocumentPartiallyRefreshed function inside an If statement. So, If the document is partially refreshed then show this message else show this message.

A simple implementation of this is as follows:

=If (DocumentPartiallyRefreshed()) Then “***DOCUMENT PARTIALLY REFRESHED***” Else “Document has been refreshed”

We can take this a step further by adding a date of last full refresh:

=If (DocumentPartiallyRefreshed()) Then “***DOCUMENT PARTIALLY REFRESHED***” Else “Document last refreshed:”+FormatDate(LastExecutionDate(DataProvider()) ,”dd/mm/yyyy”)

So a user opens their ‘refreshed’ report, and if there has been a problem, the statement “***DOCUMENT PARTIALLY REFRESHED***” should be prominently displayed.

If you REALLY want to make sure the user notices this message, you could create an Alerter on the cell. If the document is partially refreshed, lets highlight the text in this cell a bright red colour.

To do this, create a formula as follows:

=DocumentPartiallyRefreshed()

Give the formula a variable name such as v_Partially_Refreshed.

Highlight the relevant cell on the cover page and click on the Alerter button.

Click Add to add a variable to compare. In our case, select v_Partially_Refreshed.

Operator 1 should be an equals sign and Value 1 should be 1.

Select the dropdown from the Result box and Format to your heart’s content. Red and Bold for this type of exception looks good.

For those using Web Intelligence, the DocumentPartiallyRefreshed function and the steps to create an Alerter are exactly the same.

There you have it. A practical use of the DocumentPartiallyRefreshed function.

Are there any other functions you would like me to cover in this blog? If so, drop me a comment and I will try to oblige.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: