Skip to Content

How to jump to a different report dinamically

Hi,

I´m writting this post as a extension of How to set a WEBI document to autorefresh each n seconds

One of the questions raised was if I knew how to dinamically jump from one report to another programatically.

Digging a little, I found out a solution.

It´s a simple script. So, here it is

I´m assuming that the document in which you´re setting the script has 3 or more reports.

1 – Drop a blank cell in your main webi report(the one from which your´re jumping to the other);

2 – Set its value to

<input type = “button”  value =”Go to Report2″ onclick=”gotoReport(1)”>

<br>

<br>

<input type = “button”  value =”Go to Report3″ onclick=”gotoReport(2)”>

<script>

function gotoReport(n) {

this.parent.selectReport(n);

}

</script>

3 – Set the cell Reading as property to HTML

Your document will render like this :

mudar report.png

Attached is a sample WEBI file (.wid), in which I demonstrate the script. It´s on WEBI 4.1 SP5. The extension was renammed to .txt so I can post it here.

Regards,

Rogerio

/
mudar report.png
9 Comments
You must be Logged on to comment or reply to a post.
  • Thanks for your post 🙂 .

    I am very interested in Javascript capabilities inside of Web Intelligence. Is there any place where I can read more about Javascript functions like selectReport().

    Thanks

    • Hi Jonás,

      Unfortunately I don’t think só.

      I intend to organize all posts and Documents related to this subject in the way Webi Tricks page do.

      I  am continuing studying it.

      Regards,

      Rogerio

      • One more question, is it necessary to have Web Intelligence 4.1 SP5? I’m trying with 4.1 SP4 and the report is not rendering the HTML.

        Thanks,

        Jonás

        • Jonás, it is supposed to work on BI 3.x and 4.x.

          Did you export the report to BI Launch Pad and it´s seeing it through the HTML mode ?

          Regards,

          Rogerio

          • I am copying the same code above in a new Webi document through BI Launch Pad and set the property Reading to HTML. The code is shown as text.

            Could this be a permission issue?

            Thanks,

            Jonás

    • It is. For example:

      <input type = “button” style=”background-color:#00F”  value =”Go to Report3″ onclick=”gotoReport(2)”>

      style is a HTML property to apply CSS style as this ugly blue color.

  • We are working on 4.2 SP5 environment. We have a Webi Document containing script in a cell to jump from a report to another.

    <input type = button  value =”Go to Report2 onclick=”gotoReport(1)”>
    <br>
    <br>
    <input type = button  value =”Go to Report3 onclick=”gotoReport(2)”>
    <script>
    function gotoReport(n) {
    this.parent.selectReport(n);
    }
    </script>

    Cell properties has been configured to read the cell as HTML.

    If we open this report in BI Launch Pad it is showcasing Button and we are able to jump to another report.

    If we open the same report in Fiorified BI Launchpad we can see the buttons but report jumping is not working.

    We have done ‘Enable hyperlinks, JavaScript and all HTML elements’ in Web Intelligence Application properties in CMC.