In this recipe, we will look at a scenario that uses some basic login functionality for a dashboard created with SAP BusinessObjects Dashboards. Before you can use the actual functionality of the dashboard, a password has to be entered.
Getting ready
For this recipe you can use any dashboard you created earlier. We will use the dashboard we created in the previous recipes.
How to do it...
Drag a Rectangle component found in the Art and Backgrounds area into the canvas and resize it so that it covers the whole dashboard:
Go to the properties pane of the Rectangle component and switch the Fill Type setting from None to Solid. You can also change the color and the level of transparency here:
The result should look like what is shown in the following screenshot:
Add a Label component from the Selectors area to the canvas and place it in the middle of the dashboard.
Enter Please enter your password: in the Layout menu of the Appearance tab. You can check the Show Fill option to show a background color for this component:
The canvas should look like what is shown in the following screenshot:
Now add an Input Text component and place it below the Label component. In the General tab of the properties pane, bind the Destination field to spreadsheet cell K2. In the Behavior tab, check the option to Enable Password Protection. This ensures that only asterisks (*) are displayed when the user enters the password.
Select the three components you just added and group them.
Go to the properties pane for the grouped components. It is time to set up Dynamic Visibility. Bind the Status option to spreadsheet cell K1. Enter value 1 in the Key field:
Now we have to set up some Excel logic to make this work. In spreadsheet cell K1, enter the =IF(K2="YourPassword",0,1) formula, where YourPassword should be replaced with a password of your choice.
Your spreadsheet should now look like what is shown in the following screenshot:
Hit the Preview button and try to log in to this dashboard by entering your password.
How it works...
In this recipe, the Dynamic Visibility functionality is used to make some parts of the dashboard disappear instead of showing them. The Dynamic Visibility status is now set by an Excel formula. This if then formula checks whether the value in the Input Text component matches YourPassword or not. If it does match, the result of the formula will be 0 and the layer we put on top of the dashboard will disappear. Now you can use the dashboard.
Note
This is a method that can be used to protect your dashboard from unauthorized access. However, in an enterprise environment, when the dashboard is published in the SAP BusinessObjects BI Platform, the security is managed by the platform.