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

To report this post you need to login first.

8 Comments

You must be Logged on to comment or reply to a post.

  1. Jonás Urbano

    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

    (0) 
    1. Rogerio Plank Post author

      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

      (0) 
      1. Jonás Urbano

        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

        (0) 
        1. Rogerio Plank Post author

          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

          (0) 
          1. Jonás Urbano

            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

            (0) 
    1. Jonás Urbano

      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.

      (0) 

Leave a Reply