Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Data Cell Binding is a very powerful tool in SAP BusinessObjects Design Studio 1.5 to better visualize your data ( I am following up a blog post by jeroenvandera back in June ). One of the use cases for this function demonstrated in this post is to format your data display according to data value by changing CSS Class of the text component. Let’s look at the customized KPI tile below, where we have the following requirements:

Change in percentage > 0: text in green color with an up-arrow suffix.

Change in percentage < 0: text in red color with a down-arrow suffix.


Such color-based alert will give users instant insight about the business performance. This styling can be achieved in two simple steps.

  1. Define your styling properties in CSS file

I have two separate CSS Classes to define the styling for negative and positive values, respectively percChangeDown and percChangeUp.

Here I have define basic styling properties for color, font-size and font-weight for each class. To display picture of an arrow after the text, I use pseudo-element selector ::after and ::before to add an arrow with property content. The images used in this example,  and , are converted to Image URI (You can find online converter here). Note that when creating the images of these arrows, make sure to match their color to the text color for better visual presentation.

Upload your CSS file.

  1. Bind CSS Class Property with your data value

In the Property Panel of your Text Box displaying percentage change, Click on CSS Class and the Binding Icon on the top right corner, select Data Cell Binding.

Next, Expand CSS Binding Options by Clicking on the before CSS Class 

Select Data Source and Data Cell that you want to base your styling on. Then Click OK.

Add a New Function in the Formatter Function Option. Note that a Global Script Object must be created first. Here I have created a function call GLOBAL_SCRIPT_1.signChange


Here is the scripts for this function. It will return “percChangeUp” when the value is positive and “percChanegDown” when the value is negative for CSS Class Property of this Text Component.

Once you have created this function it will show up under Technical Components. Just click on it to edit.

Please note that the data will not be formatted in your Design Studio workplace. The formatting will be applied when you execute the application.

Hope you find the simple trick above helpful for your dashboard project!

P.S: Here are the images URI for the arrows above if you would want to use them for your dashboards:

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAOCAYAAADwikbvAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHdJREFUeNpiYBh+IGUBewA+eSY8GvuB1HognYBLDS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