Thanks to Matt Bedin, BI EE product managment and Thomas Lukens for sharing this. One of the important requirements for any user is to have multiple formatting options within a Tabular View table. For example, one might need scrolling Marquee within a column i.e make a column value move from left to right or one might want to display images from a site or one might want to even put submit forms directing to an external application and last not the least to display Gantt like charts within a tabular column. So, lets look at enabling each one of the above one by one.
Marquees:
Lets start with creating a sample report. Lets create a report with Product Names and the their corresponding Sales. Our aim is to make the Product names rotate like a Marquee.
Now go to the formula window of the Product Names and enter the below HTML text.
’<MARQUEE bgcolor=”#CCCCCC” loop=”-1″ scrollamount=”2″ width=”100%”>’||PRODUCTS.PRODUCT_NAME||’</MARQUEE>’
Now go to the Properties of this columns and navigate to Data Format and change the data format to HTML. Now if you look at the report the product names would be scrolling.
Now you can realize the kind of extensibility this can have. You can have your own HTML formatted columns. All the remaining 2 that we would be seeing are actually extensions of this property.
Images:
Lets use the same methodology above to display images. Lets display the Oracle logo that we have in the Oracle.Com website. The procedure is same. In the column formula enter following HTML
’<IMG SRC=”http://oracleimg.com/admin/images/ocom/hp/oralogo_small.gif” WIDTH=”80″ HEIGHT=”80″ BORDER=”0″ ALT=”Oracle”>’
And change the column format to HTML as above.
Gantt Charts:
One amazing use of the above HTML property is that you can mock and create Gantt Charts. Gantt Charts are basically bar charts wherein the bars would denote the size of the metric for which they are plotted on. There are many variations of this chart. But for illustration purposes lets create a simple one. In the column formula enter
’<table><tr><td style=”padding-left:0″ width=’ || CAST(SALES1.Sales/1000 AS VARCHAR(20)) || ‘ bgcolor=#9C9ECE height=16> </td></tr></table>’
Now change the data format to HTML.
Here, we are basically creating a horizontal bar whose size varies according to SALES1.Sales column. We have divided by 100 in order to bring the size relevant to HTML format. One can use this to have multiple other formatting options. If you are good in HTML then this is just for you.