Posts

Showing posts with the label webi

Freeze panes in BO Webi report like Excel

Image
Since the design of my first BO report a need kept coming up. The need for freeze panes. When there is a table that doesn't fit in the screen and you start scrolling, the moment the headers disappear you lose track of your data and start scrolling up and down, left and right again and again to see those headers. Well here it is what you need to do to add freeze pane capabilities to your report. For this example we have the crosstab table of the screenshots below: Headers disappeared The logic is quite simple. With the help of javascript we are going to move headers accordingly to the user's scrolling so as the user thinks the headers are pinned to the screen while the body of the table is moving. The problem is that if we see the structure of the crosstab it is actually an html table which means that we can not move header cells independently from body cells. HTML structure of the crosstab So we have to break the crosstab down to three independent...

How to inject javascript into a Webi report

Image
Well it's quite easy! Let's say we want to display a message to the user every time he opens the report. Step 1 The javascript is easy Step 2 We open the document and add a blank cell somewhere in the report Step 3 With the blank cell selected we go to Properties --> Display --> Read cell content as... and select HTML. By doing this we tell BO to treat whatever we write inside the blank cell as HTML. By default it treats it as it was simple text. Step 2 and 3 Step 4 We select the blank cell and write to the Formula Editor: <script type="text/javascript">alert("Hello injection!!!");</script> Step 5 Then we press the validate button and save the report. Step 4 and 5 Step 6 Open the report (view) and the message we wrote in javascript appears! Aesthetic Tip Select the blank cell and remove the borders in order to make it "invisible" to the user's eye.