cancel
Showing results for 
Search instead for 
Did you mean: 

Auto refreshing WEBI report in DHTML viewer.

Former Member
0 Kudos

Hi all.

I am trying to create a mechanism of auto-refreshing a report in DHTML webi viewer.

This should work like an on-off button - a click will start auto-refreshing, and another click (or even clicking on another button) should stop auto-refreshing.

I looked at the SP2 extension points, but I cannot find a way to do it, since it can only open JSP pages (in the main page, or in a new window).

We want to avoid touching the js, jsp and java code of the viewer itself, and to implement it only as a plugin.

Does anyone knows ? anyone tried something like that ?

Any ideas ?

Thanks a lot,

Udi Razmovich.

Accepted Solutions (1)

Accepted Solutions (1)

ted_ueda
Employee
Employee
0 Kudos

That'll be a bit problematic to implement with the DHTML viewer, since you'd need JavaScript to trigger the client-side request.

Another way - to refresh a OpenDocument URL reporting frame via client-side JavaScript - will also have issues (since you'd be re-requesting the report repeatedly).

How about BI Widgets? It's not an SDK, but it does allow for refreshes of documents on the desktop.

Sincerely,

Ted Ueda

Answers (8)

Answers (8)

Former Member
0 Kudos

Hi Ehud,

Can you please paste the Code where it will call the "Refresh Data".

We are XI R3 and we would like to Auto Refresh the Document every 5 mins without reloading the whole document.

Regards

Kiran

Former Member
0 Kudos

Hi Harald.

I am not just refreshing the URL.

It's so frustrating I cannot post my script...

In general, what it does, it injects code to the opening window, and this code takes the URL parameters from the 'Report' frame, and calls the refreshDocument.jsp with the frames parameters (query string) from the 'Report' frame.

All this code is used with javascript's setInterval function, so that it does the refresh every certain amount of time.

This causes the data to refresh (a hit to the DB). I am 100% sure about it, because I updated the DB and I saw the data refreshes.

Anyway, I think that calling the same functionality of the "refresh data" button will be a much better solution, but I cannot find it, since this button does not have 'onclick' property defined (or anything like it). It probably uses some kind of event-registration, so it is very difficult to follow, if at all.

For the solution I wrote, which is working, I used a HTTP proxy and saw that what does the actuall refresh is the refreshDocument.jsp page.

Any ideas (about finding out the functionality of the "refresh data" button, or about posting my script here) ??

Thanks a lot

Udii

former_member189544
Contributor
0 Kudos

Hi,

just refreshing the content of the window/frame where the report resides is not enough. You will need to trigger the functionality of the refresh button, otherwise you will just refresh the content and not hit the DB for new values...

In the moment I can not say how this can be done. Maybe debugging/proxying the HTTP stream will give you a clue.

You may post the code when you try to leave the <javascript> tags maybe...

Regards,

Harald

Former Member
0 Kudos

How can I post here a post with JavaSCript code sample ???

I would like to share the code, and ask about it, but I just cannot post it.

I tried to put it as code (in the post editor), to quote it - it would not help...

I get the following error:

Method Not Implemented

POST to /post!post.jspa not supported.

Thanks again.

Udi

Former Member
0 Kudos

well, I guess it is the content of the post that I wrote (it containd javascript code and html code).

I managed to implement auto-refresh mechanism for SP2 - it is a jsp file, that is used through a user_extension.

The jsp opens, 'injects' javascript code to the opener (where the report is) that makes it reresh every few minutes.

Well, it works, and it refreshes the data (I tested it agains the DB), but...

It does not update the report 'lat update' (in the bottom-right corner of the report), and it does not open the little 'refreshing data' window (the one with the progress bar).

I want to post here the jsp code, but it seems I cannot.

Anyway, I am sure it is possible to imporve my solution, especially those two points I mentioned above.

I will try again to post the code. if not, I will explain what it does how and why...

Thanks.

Former Member
0 Kudos

There's a reply I would like to post, and cannot post it. I get error message all the time.

I am just testing if it is the post content, or general problem...

Former Member
0 Kudos

Hi Ted.

Thanks for the reply.

I am afraid the BI widgets will not help us too much.

I have some ideas about how implementing what I want.

There is something I have some hard time to find out - there is a "refresh data" button in the DHTML viewer, but I cannot find what script does clicking on it call. I guess it has something to do with registering event or something like that.

If I would have known what javascript function does it call, it woud help me a lot.

Do you (or anyone else here ) have any idea what is the function that this button calls, or, how can I find that out ?

Thanks again

Udi.

Former Member
0 Kudos

Hi Ted.

Thanks for the reply.

I am afraid the BI widgets will not help us too much.

I have some ideas about how implementing what I want.

There is something I have some hard time to find out - there is a "refresh data" button in the DHTML viewer, but I cannot find what script does clicking on it call. I guess it has something to do with registering event or something like that.

If I would have known what javascript function does it call, it woud help me a lot.

Do you (or anyone else here ) have any idea what is the function that this button calls, or, how can I find that out ?

Thanks again

Udi.