Skip to Content
Author's profile photo Former Member

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

Assigned tags

      9 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      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

      Author's profile photo Former Member
      Former Member
      Blog 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

      Author's profile photo Former Member
      Former Member

      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

      Author's profile photo Former Member
      Former Member
      Blog 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

      Author's profile photo Former Member
      Former Member

      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

      Author's profile photo ohad 23
      ohad 23

      Thank You

      Is it possible to change the type of button? to change the color or something like that...

      Author's profile photo Former Member
      Former Member

      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.

      Author's profile photo Former Member
      Former Member

      Hi I am unable to see attached text file.

      Author's profile photo Satish Soni
      Satish Soni

      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.