Skip to Content
author's profile photo Former Member
Former Member

Auto refreshing WEBI report in DHTML viewer.

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

9 Answers

  • Best Answer
    Posted on Nov 16, 2009 at 05:46 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 26, 2009 at 10:43 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 17, 2009 at 08:04 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 17, 2009 at 08:43 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 26, 2009 at 10:11 AM

    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...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 26, 2009 at 10:21 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 26, 2009 at 10:31 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 26, 2009 at 11:39 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 11, 2013 at 10:44 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.