Learn step-by-step guidelines for creating and implementing an IP address-based smart Web Intelligence filter solution to extend SAP Web Intelligence’s filtering capabilities. In addition to IP addresses, this smart filter tool works well with computer names, local network names, or Windows logon users. Using any of these options, you can implement a smart Web Intelligence filter based on your needs. The steps required to implement this solution are illustrated using an example scenario.
Key Concept
OpenDocument is a feature provided by the BusinessObjects system that takes a special parameterized URL and processes it to deliver BusinessObjects documents in an appropriate view to users. This parameterized URL can be sent to users via email so they don’t have to navigate through folders to find documents inside BI launch pad.
Web Intelligence (also known as WEBI or WebI) is a key reporting solution within the BusinessObjects family that allows you to create a prompt or constant filter on your reporting data. With this feature, users can enter different data and also can personalize their reports. However, sometimes organizations need an even more flexible solution. To overcome this challenge, I came up with a solution I call an IP address-based smart Web Intelligence filter. To illustrate how to implement this solution, I provide an easy-to-follow, step-by-step tutorial, with retail stores as my example scenario.
The IP address-based smart Web Intelligence filter is used to deliver reports to stores via a URL without asking for any prompted filter or authorization information. This filter is able to recognize the IP address of each store and then deliver filtered datasets to that location based on the IP address provided. In this scenario, it is crucial that reports be delivered to all the stores in the chain to show each store how it’s performing and to learn what it needs to do to improve sales performance. This can be really challenging when there are more than 100 stores in the chain.
In order to implement the IP address-based smart Web Intelligence filter, SAP BusinessObjects BI Platform, Web Intelligence, Visual Studio, and the BusinessObjects .net software development kit (SDK) are required. Users implementing this solution should have basic knowledge and skills about programming in the asp.net environment. The IP address-based smart Web Intelligence filter uses OpenDocument to show created reports and responds to Web Intelligence-created filters. It also uses BusinessObjects .net SDK to get authentication tokens from the BusinessObjects system to create an authenticated secure connection between users and the SAP Business Objects BI launch pad without asking for a user name or password.
First, I discuss OpenDocument’s concept, usage, and required parameters. Second, I explain how to implement and use BusinessObjects .net SDK in detail. Lastly, I explain IP recognition as well as how to combine two components of this solution into the IP address-based smart Web Intelligence filter solution.
An Overview of OpenDocument
OpenDocument processes incoming URL requests for documents and any other viewable object type in the Central Management Server (CMS), and delivers the correct document to the end user in the appropriate viewer. First, you need to learn how to create parameterized URLs with the OpenDocument syntax and structure of these parameterized URLs. The most basic parameterized URL to show a specified report is as follows: https://<servername>:<port>/BOE/OpenDocument/opendoc/opendocument.jsp?iDocID=CUID&sIDType=CUID.
As in the URL above, there are three parameters required to create a basic OpenDocument parameterized URL. These are the server name, the server port, and the Cluster Unique Identifier (CUID). You can easily obtain the server name and port from your BusinessObjects BI launch pad login URL. For example, if your BI launch pad login URL is https://yourorganization.com:8080/BOE/BI, then yourorganization.com corresponds to the server name and 8080 corresponds to the port of your parameterized OpenDocument URL.
The last parameter is the iDocID, which corresponds to the unique ID of your report (which is hosted at the BusinessObjects Enterprise server). To get the CUID of the report that you want to show with OpenDocument, you need to memorize (or note) the report’s document CUID to create a shortcut. To obtain a specific report’s document CUID, log in to the BI launch pad, open the folder that contains the report, and right-click the report name to open the properties option (Figure 1).

Figure 1
The report’s properties on the BI launch pad
In Figure 1, you can see the report properties on the BI launch pad. In OpenDocument syntax, you need to give unique identifiers to each report; this is the CUID that is highlighted in Figure 1. This CUID gives you the opportunity to specify the report in the OpenDocument’s parameterized URL. Place the CUID into the structure, and the parameterized OpenDocument URL becomes: https://yourorganization.com:8080/BOE/OpenDocument/opendoc/opendocument.jsp?iDocID=Adz6yZipoAZOkWY6J_sJwGU&sIDType=CUID.
After calling this URL and submitting the user name and password, you can easily access the Sales Report for the CUID shown in Figure 1. This parameterized OpenDocument URL allows you to create a direct shortcut to a report called Sales Report, which I use as my sample report in this scenario.
The next step is to pass the filter value (created by Web Intelligence) to the BusinessObjects system using this parameterized OpenDocument URL. Using the same fictitious Sales Report, I show how to pass filter parameters via OpenDocument. First, open the Sales Report, and enter Store in the Prompts Summary box (Figure 2).

Figure 2
Open the report and see the prompts
Then enter the new parameterized OpenDocument URL—https://yourorganization.com:8080/BOE/OpenDocument/opendoc/opendocument.jsp?iDocID=Adz6yZipoAZOkWY6J_sJwGU&sIDType=CUID—in the Selected Values field on the right of Figure 2. (The Parameter Reference section of the SAP BusinessObjects OpenDocument product guide provides a list of parameters and their descriptions.) This list parameter (lsS[NAME]) gives the name to specify the value for a prompted filter for Store in the Sales Report. This parameter—NAME—corresponds to the text of the prompt. In this case, the prompt text is Store, therefore this parameter in the URL becomes IsSStore. With this new parameter, the parameterized OpenDocument URL becomes: https://yourorganization.com:8080/BOE/OpenDocument/opendoc/opendocument.jsp?iDocID=Adz6yZipoAZOkWY6J_sJwGU&sIDType=CUID&lsSStore=VALUE.
After adding IsStore to the constructed parameterized OpenDocument URL, you need to specify the value of the added parameter (this is shown as VALUE in the URL, above). This parameter is case sensitive and should not have spaces, since spaces in URLs can be problematic. If there are spaces, replace them with + signs. For example, if the input value of the Store prompted filter is MUDO Istanbul, it should be embedded in the URL as lsSStore=MUDO+Istanbul. Entering the lsS[NAME] parameter, the constructed parameterized OpenDocument URL becomes: https://yourorganization.com:8080/BOE/OpenDocument/opendoc/opendocument.jsp?iDocID=Adz6yZipoAZOkWY6J_sJwGU&sIDType=CUID&lsSStore=MUDO+Istanbul.
By calling this new URL, you can access the fictitious Sales Report directly. In addition, when the username and password information is entered, the report shows the store named MUDO Istanbul sales information directly. However, you need to add one last parameter to force the report to refresh so you get updated data from the Universe or SAP BW. First you need to disable the Refresh on Open setting of Web Intelligence. Open the report with Web Intelligence and click Document in the Properties tab (Figure 3).

Figure 3
The Web Intelligence document properties
This opens the Web Intelligence document settings screen (Figure 4). Uncheck the Refresh on open check box and click the OK button to save your settings.

Figure 4
Disable the Refresh on open option
Once you have updated the Web Intelligence report settings, you need to specify this same option in the OpenDocument parameterized URL. The Parameter Reference section of the SAP OpenDocument product guide has a parameter, named sRefresh, for indicating whether data should refresh when the OpenDocument URL is called. This parameter, like a Boolean variable, has two kinds of inputs. Instead of T (true) or F (false), this parameter has Y (yes) or N (no). Since updated data needs to be delivered to stores, you need to add this parameter to the constructed parameterized OpenDocument URL. Set the value to Y to ensure that every time this URL is called, the updated data is included in the report. Then add sRefresh as the last parameter, and the constructed parameterized OpenDocument URL looks like this:
https://yourorganization.com:8080/BOE/OpenDocument/opendoc/opendocument.jsp?iDocID=Adz6yZipoAZOkWY6J_sJwGU&sIDType=CUID&lsSStore=MUDO+Istanbul&sRefresh=Y.
How to Implement and Use BusinessObjects .net SDK
The next step is to make this constructed parameterized OpenDocument URL dynamic and to disable the user authentication panel with the help of BusinessObjects NET SDK every time the OpenDocument URL is. For example, when store personnel want look at a report, by using the IP address-based Web Intelligence filter, they can just enter the URL they have and they won’t have to deal with any filter prompts. The system automatically recognizes the store’s IP address and fills the related Web Intelligence prompts with that store’s information. In my scenario, every store’s IP address contains its store number as the third segment, and this number is associated with the store’s name in a database table. So, for example, if the received IP address is 192.168.34.0, then 34 represents the unique ID of the store. This ID is also listed in the associated database table where mapping between store ID and the store name is stored.
To make constructing a parameterized OpenDocument URL automatic, you need to create an empty Visual Studio 2013 Web Project. In this Project, there are two steps for implementing the IP address-based smart Web Intelligence filter. The first is to create an automatic mechanism to enter input into the lsS[NAME] parameter. The second is to gather a log-in token from the BusinessObjects enterprise to disable the log-in panel of the BI launch pad each time the OpenDocument URL called.
To get the IP address of the client’s computer (the store) and to get the store’s name from the database, you need to write a .net function called getMallName(). The source code for this is shown in Figure 5.

Figure 5
The source code of the getMallName() function
First you need to determine the IP address of the client in the getMallName function. The .net library provides some server variables such as REMOTE_ADDR. With this variable, you can access the client IP address as seen in Figure 5. The storeID is found in the third segment (make sure you check the server’s variables’ length to ensure it’s a valid IP address). The next step is to create a database connection and send a relevant query to the server (to get the store name). The connection parameter has four inputs. They are: database host IP, database name, username, and password. The database name must be an appropriate scheme that contains the table that stores the name, and maps between the store ID and the store name.
The returning value is a string that contains the store name and gives the input value to the lsSStore parameter. With this function, the IP address-based Web Intelligence filter solution gains flexibility by automating the Web Intelligence prompted filters. However, this function itself is not enough to implement the solution. The final step is to combine this function with the authentication token via BusinessObjects .net SDK.
To get a login token from BusinessObjects Enterprise, first you need to download BusinessObjects .net SDK from the SAP web site. After downloading this package, you need to add a reference to the already created project that contains the getMallName function. To implement the IP address-based smart Web Intelligence filter solution, you need two references of BusinessObjects .net SDK. They are CrystalDecisions.Enterprise.Framework and CrystalDecisions.InfoStore. These two references give the Visual Studio 2013 Project the ability to communicate with BusinessObjects Enterprise.
After adding these references to the Visual Studio 2013 Web Project, you need to give it five parameters to create a communication gateway between the .net web project and the BusinessObjects Enterprise. These five parameters are shown in Figure 6.

Figure 6
BusinessObjects Enterprise Variables
The five parameters are:
- CMSUserName: This corresponds to the login user name information
- CMSPassword: This corresponds to the login password belonging to any given username
- CMSServer: This corresponds to the gateway communication URL that you used to construct the parameterized OpenDocument URL
- CMSAuthType: This corresponds to the authentication type of a given username and password
- OpenDocURL: This corresponds to the root base of OpenDocument
In addition, the SecEnterprise value given to CMSAuthType variable indicates that it’s an authentication type that needs information, which you enter in the BI launch pad login screen.
After creating the required variables for the communication gateway, you need to import the required libraries. As seen in Figure 7, you need six libraries to implement the IP address-based smart Web Intelligence filter. They come with a dummy project, and you need to add the System.Data.SqlClient project(to communicate with the SQL database server to retrieve the store name information) and the CrystalDescisions.Enterprise project (to use BusinessObjects’ .net SDK capabilities).

Figure 7
Required libraries
Recognizing the IP and Combining Two Components to Create the IP Address-Based Smart Web Intelligence Filter Solution
The next step is to implement the most important part of the IP address-based smart Web Intelligence filter. This allows users to log into BusinessObjects Enterprise and redirect the constructed parameterized URL to show store personnel the refreshed filtered report without having to supply user name and password information.
First you need to create EnterpriseSession type variable called cdSession. This is the communication gateway with the constructor named cdSessionManager, with pre-implemented function called login. The login function needs four variables (which you created earlier). After establishing communication, you can get an active session token as seen in the second line of Figure 8.

Figure 8
BusinessObjects .net SDK usage
The RedirectURL variable is in the constructed parameterized OpenDocument URL and contains the token information. Instead of giving a constant value to the lsSStore parameter, you need to use the getMallName function to recognize the IP address and fetch the store name from the database according to its unique ID. After combining these code snippets, you have achieved your new IP address-based smart Web Intelligence filter solution. The source code is shown in Figure 9.
using System.Collections.Specialized;
using System.Configuration;
using System.Web;
using System.Data.SqlClient;
using System.Net;
namespace IpBasedSmartWebIntelligenceFilter
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SessionMgr cdSessionManager = new SessionMgr();
EnterpriseSession cdSession;
String cdToken;
String redirectURL = null;
String CMSUserName = userName;
String CMSPassword = yourPassword;
String CMSServer = https://yourorganization.com:8080;
String CMSAuthType = secEnterprise;
String OpenDocURL = https://yourorganization.com:8080/BOE/OpenDocument/openDocument.jsp;
try
{
// login to enterprise
cdSession = cdSessionManager.Logon(CMSUserName, CMSPassword, CMSServer, CMSAuthType);
// get active token
cdToken = cdSession.LogonTokenMgr.CreateLogonTokenEx(, 5, 1);
// create parameterized OpenDocument URL
redirectURL = OpenDocURL + ?&iDocID=Adz6yZipoAZOkWY6J_sJwGU&sIDType=CUID&token= + HttpUtility.UrlEncode(cdToken) + &lsSStore= + getMallName();
// logoff from enterprise
cdSession.Logoff();
// redirect to parameterized OpenDocument URL
Response.Redirect(redirectURL, true);
// Complete request
HttpContext.Current.ApplicationInstance.CompleteRequest();
}
catch (Exception err)
{
Console.Write(err.Message.ToString());
}
}
public String getMallName()
{
String storeID;
// get IP address of client
String ip = Request.ServerVariables[REMOTE_ADDR];
String[] ipSegments = ip.Split('.');
if (ipSegments.Length == 4)
{
storeID = ipSegments[ipSegments.Length - 2];
}
// connection string
SqlConnection conn = new SqlConnection(Data Source=host_ip; Initial Catalog=database_name; User Id=username; password=password;);
conn.Open();
// query
SqlCommand command = new SqlCommand(SELECT STORE_NAME FROM STORE WHERE STORE_ID = + storeID, conn);
SqlDataReader reader = command.ExecuteReader();
String mallName = null;
while (reader.Read())
{
mallName = reader.GetString(0).Trim();
}
return mallName;
}
}
}
Figure 9
Source code for the IP address-based smart Web Intelligence filter solution
I have shown how to leverage OpenDocument’s concept, usage, and required parameters; and BusinessObjects .net SDK usage to log onto BusinessObjects; explained session tokens; and how to implement the IP address-based smart Web Intelligence filter to get client IP addresses and identify store names to show relevant, updated information in the report. Although I used an IP-based filter in my example scenario, these concepts and information can be used to create smart filters in any area. For example, the IP address-based smart Web Intelligence filter solution uses IP addresses to identify clients, but if an IP-based filter cannot be applied, other information can be used to identify stores, such as computer name, local network name, or the Windows logon user. In addition, this tool can be used to create any type of filtering mechanism under asp.net and BusinessObjects limitations, such as creating an automatic time-interval filter (yesterday, last year, this week, and so on).
Murat Yavuz
Murat Yavuz is a Data Warehouse & Business Intelligence Developer at MUDO, Turkey’s leading fashion and furniture retailer, and is responsible of delivering SAP BI projects. He has broad experience in SAP BW, BusinessObjects, HANA, ABAP, and mobile app development. Currently, Murat's focus is on SAP BW 7.4 on HANA.
You may contact the author at Murat.Yavuz@mudo.com.tr.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.