Archive for the ‘Web Intelligence’ Category

Infographic style webi

Web Intelligence reports are often thought of as boxy, ad-hoc’ish, somewhat sloppy collections of tables and charts. Of course, when creating quick ad-hoc analysis queries, that is completely appropriate, but when designing corporate reports for disseminating information in a way that will appear to the information consumers, webi provides all the tools of any top notch reporting application to create visually stunning presentation that can engage and tell a story.
To make this point, i looked at my colleague, Josh Tapley blog, data-ink, and found two of his stunning examples of reports and dashboard design. Josh used Xcelsius and our HTML5 dashboarding solution to create contemporary, info graphic style presentations. I used his design to produce a webi report that follows the same pattern, and i think the result can be quite compelling, certainly not your average webi report… Enjoy.

Webi Refresh on open in 4.0

Published by Ron Keler in Web Intelligence on April 2nd, 2012 | No Comments »

I never quite understood why webi reports save with data by default. Since almost all usage scenarios of webi i have ever encountered involve either viewing reports on demand, or viewing the last scheduled instance, leaving data saved on reports is not only a nuisance, but also a security problem.

Experienced report developers know to purge the report data before saving and set the report option to refresh on open, to assure the reports hits the database when opened.

In BI 4.0, the refresh on open option was moved, and i wanted to share its location, since i spent some time finding it myself… So:

Open your webi report in design mode using the interactive (java) viewer (the rich client works the same, i have not checked the html viewer, i assume it’s located in the same general area…). Click on the report properties button (top button in left toolbar) and then click the Edit button (small button at top)

  

You will see the option to refresh on open at the bottom of the Edit screen (with some other familiar choices…):

 

Integrate BusinessObjects BI Services 4.0 with PHP

BusinessObjects 4.0 web services provide a access to BI content for any application that can invoke and consume web services. Xcelsius is probably the best known example of this notion in the BO applications space. Xcelsius (SAP Dashboards) leverages the BI Platform web services for any sort of integration/data connectivity, from authentication/authorization to getting data from webi report parts thorugh BI Services, QaaWS or Live Office.
While SAP provides very good documentation for the web writing web services applications using its java and .net APIs there’s really not a lot out there if you wnat to use something else to consume these web services. For example, if you are running a php application and are looking to integrate some BO data in your web site, there’s really no information to get you going. So, what can you do? Well, here’s how I went about figuring out PHP integration with BO using BI Services:
First, i created a simple webi report, using eFashion universe, and published my report block as a BI Service.

Next, i created a simple java application, using the web services api, to call this web services. The java web services sdk documentation is very explicit about simple use cases, like calling a web service, or you can leverage eclipse (which is what i did…) to build your web service client, using the swdl of the BI service created.

The next step is the secret sauce really… using a network sniffer (i used wireshark), i captured the http traffic while executing my java client and VIOLA, i had the soap envelope xml for calling my BI service!

With this in hand, i used nusoap, a commonplace soap api tool for php and was able to reconstruct the soap request in the nusoap client, call my bi service from the BO server, and parse the results into a simple html table. You can find the php file for download here. Enjoy.

Google maps in webi 4.0 mashup

I recently received several questions about a google maps in webi mashup post i published some time ago. So, i decided to redo the example, using SAP Business Intelligence Platform 4.0 and the latest version of webi.

 In the original post, i used server side code (.jsp file) to pass info from the webi report to the google maps. This time, i used client side code (javascript), which is better suited for this application and provides better flexibility.
The crux of this approach is as follow:
A webi report based on the e-Fashion sample universe was created, the report has store address info, and yearly sales numbers.
The webi report contains two blocks. The left block has hyperlinks with store addresses, and the right block contains the map. When you click a store on the left, the map updates with the address of that store and the map info window displays the store yearly revenues as a bar chart.
 The map is created in webi using a small html code snippet that embeds the html file that contains the actual map parsing and creation code in an iframe inside a div.
The left block contains a formula that translates the store addresses and revenues to html  hyperlink that targets the iframe, passing it different address and sales data so it reloads with the new store data as you click the hyperlinks.
That’s it in short. You can find the report .wid file, and the embedded html file in a zip here. Enjoy!

BI Services Run Time Configuration Explained

SAP BusinessObjects BI Services are a class of web services that can be easily created by converting web intelligence (webi) report blocks into web services. A simple GUI wizard guides the report developer through a few simple steps that publish the report block as a web service and provide a WSDL that can be used to interact with the report block data. As i wrote in an older post, the BI Services combine the power of Live Office in leveraging webi full capabilities (using variables, filters, formulas, cross tabs, etc) with the power of QaaWS web services (good caching capabilities for enhanced performance).
The BI Services publish with two default methods. A GetReportBlock method and a Drill method. For this post, i will examine the GetReportBlock configuration and describe some of the refinements you can apply to the web service as you consume it in your application.
First, a word about the difference between prompts and filters: BI Services introduce a powerful concept of filters. Basically, any object in the report can be used as a filter in the web service. Filters can be applied at the database level during query time, or to a saved report instance data. Prompts are only applicable at the database level and cannot be applied to saved instances.
Next, there are two main input parameters that control the GetReportBlock behavior with regards to filtering and running against the DB vs running against saved reports instances: refresh and getFromLastDocumentInstance (or getFromUserInstance in “bursting” schedules scenarios). All these parameters are boolean types and setting them to true or false will result in different behavior from the web service during consumption time. Here are some example:
The initial setup is a simple report that returns the Years object from the e-Fashion universe. The report has an optional prompt on the Year object. The simple report block was published as a BI Service. When we run the report, it looks like so in webi:

 We can test the web service configuration right from within webi

In our first test, we set the refresh parameter to true and send the request. This is because we set the report to refresh, we did not specify a prompt value, and since our prompt is optional, it was ignored, and we did not specify any filter value.

In the second test, we still use the refresh parameter to hit the database, but this time we specify a prompt value. We get back the year row we expect.


 
To demonstrate the interoperability of the filter and the prompt in a refresh scenario, we clear out the prompt value and use a filter that is set to equal a different year now.

Now, let’s try review what options are available when we schedule the report and save it with data. Let’s schedule our report with two years (rows) of data: 2004 and 2005.

This time, when we go to test our web service, let’s use the saved report instance, and see what happens. First, let’s change our test settings to use the getFromLastDocumentInstance instead of refresh, and leave the filter value empty (since we are working with a saved instance, the prompt value will be ignored even we if we try to use it). This time, we will get the saved instance results, just two rows of data.

If we apply a filter for say, year 2005, we get the data from the report instance

We will not hit the database, so even if we try to filter for a value we know to exist in the DB, such as 2006, since we are only getting data from the saved report, we will not get any result back.

 

Also, if during testing you lose the state of your service between cached and non-cached versions, or need to reset the service state for any other reason, you can set the resetState parameter to true.

So all in all, the BI Services provide a lot of configuration options to address a wide range of reporting use cases from all saved data to no saved data used.

Webi enhancements in 4.0: dynamic chart titles and formula wildcard name searching

Published by Ron Keler in Web Intelligence on December 11th, 2011 | 5 Comments »

Web Intelligence has a lot of new features and capabilities that make life a lot easier for report developers. A couple that i ran across and thought were very useful are the ability to use a formula as a chart title and the ability to easily search for functions right in the formula builder in webi.
The first enhancement I mentioned above is long overdue and very helpful. In pre 4.0, webi charts could only be created with static titles. This could only be overcome by creating complex workarounds (like creating a single cell block with a formula, and using relative positioning to place it on top a chart to make it look like its title). Now, you can simply type the formula you want to use as the chart title. Nice.

The second tip, helps report developers navigate the formulas library in webi. When you open the Formula Editor and select the Ctrl and F keys on your keyboard, you will get a little “Search for:” tooltip on top of the formulas list. You can use a * character as a varchar to search for any formula that contain the word date or format in its name..

 

Using webi ForEach function to solve complex aggregation problems

Published by Ron Keler in Web Intelligence on November 13th, 2011 | 6 Comments »

When you create variables in web intelligence, they must be assigned a qualification. This qualification assigns a “strong” type of either a measure, or a dimension (or a detail) kind of object to your variable. This strong tying has a profound impact on how webi handles aggregation of values in the variable you create, and can be the cause of many headaches for report developers trying to handle complex reporting requirements. The following example uses the e-Fashion universe for illustration purposes:
Imagine you need to produce a report that contains a reporting year in column one. Column 2 should display the revenue for the year in prior year, and a revenue state for the current year, and the revenue by state in the third column, for the current year only. Seems fairly simple, right. You can create a fairly simple variable in webi to satisfy the condition for column 2: If([Year]=”2006″;[State];[Sales revenue]) (If the year is 2006, the current year, display the State, else, display the revenue). Your variable will have to have a qualification, and will default to a dimension most likely. When you place your variable in the report, you will see a result far from what you were looking for:

What is happening is that webi is treating the variable value as a dimension and is not aggregating it across the states for the prior years. So even though the states are not displayed, we still get multiple rows for the years, as if the states were included in the calculation context.
Try to change the variable qualification to a measure, and you get the flip side of the problem: now you get the infamous #MULTIVALUE error because webi is treating the list of States like a measure and is unable to aggregate multiple States per Year.

What can you do? Using the ForEach webi function, you can enforce the proper calculation context for each part of your variable and “loosen” the tight typing of your variable due to its qualification:
If([Year]=”2006″;[State];[Sales revenue] ForEach ([Year]))
Make sure you set the variable qualification to a dimension, and now webi will be able to properly calculate the proper aggregation for each year, as expected.

Add a similar formula as your third column variable (If([Year]=”2006″;[Sales revenue] ForEach([State]);”")), apply some formatting (with NumberFormat()), and there you go, requirement met.

Dynamic visibility in webi

Published by Ron Keler in Web Intelligence on November 5th, 2011 | 4 Comments »

One of the features that webi was lacking for years was the ability to conditionally suppress columns. Especially when compared to Crystal that supported this kind of functionality from the get go, or Xcelsius with its dynamic visibility, webi report designers needing to show or hide columns in tables based on certain conditions were left to use cheesy tricks like setting the column width to 4px (historically, the minimum column width in webi) with white font and white background alert rules. This technique worked “O K” online, but exporting reports to excel revealed the “hidden” data columns and the extra padding could cause some formatting issues.
Well, webi in BO 4.0 has made a big step forward to resolve this issue. Now, any report element can be conditionally set to hide based on a formula, allowing report developers to create different tables for different scenarios.

Consider this simple example, using the e-Fashion universe:
Your reporting requirement is to present e-Fashion stores revenues by State and City, prompting users for a reporting Year. Moreover, in 2004, there were less stores and management wants to break down sales by stores, but only in 2004.
You can start by setting up your query with the needed objects: State, City, Store Name, Sales Revenue and Year. You can make Year a prompt.
Now, you can create two blocks in webi: one with the store name, and one without.

Next, use good old relative positioning to align them along the top right corner of each other.

Finally, go to each report block format options, and specify the appropriate formula to determine when to display or hide it.

And Voila! When users select 2004 as the prompt value, they will get the store names column, for other years it will disappear.

Magic Quadrant bubble chart in BI 4.0 Webi

Published by Ron Keler in Web Intelligence on September 26th, 2011 | 2 Comments »

SAP made some significant improvements in the Web Intelligence reporting tool with the release of the latest version of their BI stack, 4.0. One of the improvements is the addition of several new chart types, and overall improvements in the charts data visualization quality. As an example, i tried to use the new webi bubble chart and was pleased to be able to produce a good presentation of one of my favorite charts/visualizations:  a magic quadrant. The magic quadrant was made famous by Gartner who typically plots various vendors across four quadrants representing the marketplace. This is a very effective way to visualize and quickly understand the relative position of different entities in a complex environment. To improve on this visualization, the bubble chart also allows you to use the bubble size to represent an additional piece of information, so that even within each quadrant you can further grasp very quickly and effectively the position of entities in relation to each other. It’s a great way to represent many business domains, such as sales pipeline, financial information or HR data. In this example, i used the e-Fashion sample database to plot revenues, quantities and margins for states. You can find the .wid file here.

Create your own webi report part viewer using HTML DIVs

Published by Ron Keler in Web Intelligence on August 30th, 2011 | No Comments »

Very often i run into the need to embed a webi report part, such as a table block, in a separate application, outside of InfoView. There are many ways to accomplish this, from leveraging the webi REBean SDK to using the openDocument api. The openDocument api in particular is very handy, since it is so easy and simple to use, and requires no coding. However, in many cases, all that is needed is the report block to be displayed on a screen, rather than the entire webi interface. Using some carefullt placed HTML placed DIVs, you can accomplish that.
While the openDocument api does have the ability to display specific report parts, using the sReportPart argument, it provides only limited functionality. It is officially only supported for Crystal (although it does work with webi as well), but fails to include some of the important controls that come with webi such as pagination, filters, saving and zooming. Leveraging html DIVs, you can “hide” the elements of the webi page that you are not interested in showing, and create a webi presentation, with no coding, that can be included in an external web application.


In the example captured above, you can see an Xcelsius selector with a webi table underneath. The selector uses an EIC to pass a parameter value to the webi report part using the openDocument api and a JS function reloads the webi iFrame when the EIC value changes. DIVs are used to cover up all the webi “extra” unwanted elements, and expose selected menu options as well as the table block.
You can find here the sample files, zipped (xlf, swf, html and .wid, based on e-Fashion).

© BI HAPPY
CyberChimps