BOXI Web Intelligence - Tips N Tricks
BOXI Web Intelligence - Tips N Tricks
BOXI Web Intelligence - Tips N Tricks
-- By Charuta Sathe
While working on Business Objects, there were certain learnings, as well as some tricks used that might be helpful when developing Web Intelligence reports. Few of these are listed below -
Progress Bars in Web Intelligence ..........................................2 Formatting Hyperlinks using JavaScript & HTML .......................3 Working with Merged Dimensions...........................................5 Adding Total rows at the start of Table ...................................6 Working with Optional Prompts .............................................7 Hiding Report Blocks when exported to Excel............................8 Troubleshooting in BO ...................................................... 10 Did you know? ................................................................ 11
Step 1: Drag a Horizontal Grouped Bar Chart on the report and place the measure object that needs to be plotted. Please note - the chart will not have any dimension objects! Step 2: This chart will not plot any values on the X-Axis. Format the chart height and width as required. In Appearance tab, there is a property Show Floor which needs to be unchecked. By default, this is checked. Step 3: Some more chart properties that need to be set for X-Axis, Y-Axis, scale needs to be specified with the Min and Max value, based on the range (E.g. for Percentages 0 to 100) Step 4: For displaying multiple color codes on the progress bar, based on the progress attained, multiple components needs to be used, and shown conditionally. The final output looks like this
On clicking the hyperlink on revenue figures, it would conditionally call the detailed report or would give a message in case there is no data available.
Step 2: For displaying an alert message, JavaScript function is used. <SCRIPT LANGUAGE="JavaScript"> function MsgBox () { alert ("No Data to retrieve for Current Selection") } </SCRIPT> The above code can be placed in a blank cell, anywhere on the report. In the properties tab for the Blank cell, Read cell contents is changed to HTML MsgBox () function is invoked in the hyperlink code. The alert message is a meaningful one, instead of opening a blank report.
Based on the selection, the values are displayed on the report header. Cascading is required on the drill filters, example, on selecting a Division EAST, Area filter should show the areas for EAST division. This is achieved by setting the hierarchies on the universes. Issue with Merged Dimensions: 1. Cascading doesnt work with merged dimensions, as the hierarchies are set on the original query objects, not on the merged ones. 2. In some cases, the values shown on the filter are not in sync with the data shown on the report. This was because report had report filters with merged dimensions as well as direct objects from the Main query. For Example, Sales Region object comes directly from a Main query (query 1), whereas Sales Rep is a merged dimension (from query1 & query 2). For Region - 1, there are 3 representatives in the filter, but the report displays more data for representatives coming from both the queries. Workaround: The workaround followed is to use the direct objects from the Main query (Query 1) in the report filter, and display the merged dimensions on the report header as well as on the report. This sounds strange at first, but as hierarchy is set on universe objects, it works perfectly! All the objects required as report filters has to be included in all the queries, to sync up the data shown on the report.
Workaround: The solution is using Breaks! This is achieved by adding the total rows as Break headers. Step 1: Add an extra row/column; place a dummy variable in it. Step 2: Apply break on it, and format it such that it does not appear as a part of the table. Step 3: In Break properties >> Uncheck Break Footer (by default it is checked) & Show Break Header Step 4: Breaks >> Page Layout >> Repeat header on every page This is to be unchecked. Step 5: Add required number of rows in the break header and format it accordingly.
Issue with optional prompts while report navigation: Ideally, there is no need to pass any prompt parameters when navigating from Parent report as none of the prompts in the child report is mandatory. Yet however, every time when child report is called via hyperlink, it opens the prompt window, and a value has to be selected. This looks to be one of the weird behaviors of Web IntelligenceThe optional prompts need not always be optional! Workaround: When a value is selected, that parameter value is passed, when nothing is selected, yet some value has to be passed as a prompt parameter. This is achieved using Pattern Matching where, * implies ALL Hyperlink Code: "<a href=\"../../../OpenDocument/opendoc/openDocument.jsp?iDocID= +"&lsSSales+Region="+URLEncode(If(UserResponse("Sales Region")<>"";""+UserResponse("Sales Region");""+"*"))+"\" title=\"\">All Rep Details</a>" The prompt in the child report are set as given below -
Workaround: There is no direct way of hiding the blocks when a report is saved to excel. This is done with conditional formatting. Step 1: Take the count for the dimension object that is used in the chart and place it in the No data found block. (This is referred to as NDF block in the below steps)
Example, a chart plots Region-wise monthly revenue. Count ([Region]) would always be greater than zero. Yet, there might be scenarios when there is no data for a particular selection. i.e. Count = 0 Step 2: Apply filter Count ([Region]) EQUAL to 0 on the NDF block. This block would appear only when there is no region i.e. when the chart is blank Step 3: The message No data found for Current Selection is displayed using alerter, when count is zero. Now, when the report is saved as excel, the NDF block is not visible! Similar steps can be used for formatting vertical tables.
Troubleshooting in BO
#TOREFRESH #TOREFRESH appears in Web Intelligence reports based on smart measures. I.e. when the measure used in the query has a projection function set to Database Delegated. The reports used SAP BW query as backend, where the projection function for a measure is set to Database Delegated by default.
The results are displayed on refreshing the document. #UNAVAILABLE #UNAVAILABLE appears when Web Intelligence cannot calculate the value of a smart measure. If a filter is applied to a dimension on which the value of a smart value depends, but the dimension does not appear explicitly in the calculation context of the measure, Web Intelligence cannot return a value for the smart measure and displays #UNAVAILABLE.
# FORMAT This appears when the format of the cell contents do not match with the format specified in the code.
CY Metric contains revenue numbers, and is given a format which was not identifiable. Example, ' FormatNumber ([CY Metrics];"Mmm-yyyy") CY Metrics has the data type number, whereas the format specified is for Date object.
10
11