Pages

Sunday, May 12, 2013

Business Objects - Deski / Webi - Embed A Hyperlink Into A Cell In A Report


This article explains how to create a HTML link that displays a value that can be clicked on to open a web page that corresponds to the value displayed.

Steps:

There are two types of links that can be imbedded into a report; a URL or an HTML code snippet.

Using the URL is ungainly to display, but it can be exported to Excel. The URL is constructed in a variable to create a fully qualified (UNC or HTTP) path to the document to be opened.
For Example:
<My URL>="\\{Server name}}\{Share & folder Path}\" &<Control No>&".PDF"

Using a HTML code snippet makes a more visually pleasing hyper link and uses less space on the report. It doesn't export the Excel properly.First the cell where the link will be placed should be formatted to read as HTML.
Second build a variable using the URL above to create the HTML code.
<My HTML>="<A href=" & Char(34) & <My URL> & Char(34) & ">" & <Control No> & "</A>"
The Char(34) functions are used to place quotation marks into the string.

Thursday, August 23, 2012

Some WebIntelligence Controls for Report Formatting

Here are some controls you can use in Webi Report Formulas while formatting the report
  • Tab
    char(9)
  • Line feed
    char(10)
  • Carriage return
    char(13)
  • Double Quote
    char(34)

Adding a tooltip text in webintelligence Report using HTML Components

Add a tooltip text in webi Report

Task:

To add a tooltip text over a link or image within WebI report.

Procedure:

To add a tooltip text over a link within a WebI report, follow the steps below:

1. Define the link in HTML syntax. For example:

="<a title=”+Char(34)+”This link will navigate you to the detail report”+Char(34)+”
href=http://anvm21:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=11004&sType=wid>
Detail Report</a>"

2. In Display property for the cell, select HTML in Read cell content as field.
When mouse is hovered over the link, the tooltip will be visible as shown below:

To add a tooltip text over an image within a WebI report, use the alt attribute in <IMG> tag. For example,
=”<img src=URL alt=Tooltip/>”

Adding Bar Chart inside table cells in Webintelligence Report using HTML Components

Add Bar Chart inside table cells in Webi

Task:

For simplicity, assume a requirement as below:
  • A view having columns for Event, Current Score, and Score of Previous attempt.
  • Show a table in the report with columns Event and Comparison. In the Comparison column, we have to show a horizontal bar chart comparing current and previous score.

Procedure:

The idea is to use a HTML table with background color where the width of the area filled by the color is dynamically varied by the score values.
Suppose, the data in the table is like below:

 
To achieve the requirement, follow the steps below:

1. Drag the following objects in the query:
Event (dimension), Current Score (measure), Previous Score (measure)
2. In the report, define a Vertical Table with two columns: one for Event and another for the
comparison.
3. In the Event column, define the formula as =[Event] and in the Comparison column, define the
formula as below:

="<html><table><tr><td><div style='background-color:#b5d7e7; width:"+[Current
Score]+";'/></td><td>"+[Current Score]+"</td></tr><tr><td><div style='backgroundcolor:#
7bbace; width:"+[Previous Score]+";'/><td>"+[Previous
Score]+"</td></td></tr></table>"

4. In Display property for the cells of Comparison column, select HTML in Read cell content as field.
5. Adjust the cell height and width to fit the chart.
6. Save the report.
Define two variables as percentage values of ([Current Score]+[Previous Score]) and use them in place of
[Current Score] and [Previous Score] in the comparison formula so that the width of the column can be fixed.

In the HTML viewer, the report will look like below:

 
Then let us add one legend for the colors used.

1. Add one free-standing cell in the report.
2. In the Formula Editor of the cell, give the formula as below:

="<html><fieldset><legend>Legend</legend><table><tr><td><div style='backgroundcolor:#
b5d7e7;width:50'/></td><td>Current Score</td></tr><tr><td><div
style='background-color:#7bbace;width:50'/><td>Previous
Score</td></td></tr></table></fieldset></html>”

3. In Display property for the cell, select HTML in Read cell content as field.

In the HTML viewer, the report will look like below now:

How Many's!!!

  • ()