主页 > 云服务器 > > 正文

网站空间_上海企业网站设计_试用

来源:胜利云 发布时间:2021-09-27 23:01 标签:企业试用上海网站空间网站设计
浏览:

Crosstabs in SAP BusinessObjects Design Studio are one of the few components which can be used as a display component as well as a selector. When used as a selector, the user can interact with the crosstab to select one of the rows.

When used as a selector component, most often, users may want to have a single row on the crosstab already selected for them by default when the application opens up. While SAP BusinessObjects Design Studio offers users options to set and filter values by default on startup, there is actually a challenge to indicate that such a selection has already been made for them (on a crosstab component). This has been a common requirement by a lot of our clients. For the consumer of the dashboard it can be misleading to have such a default selection and not showing it to users. Now, while there is no option inside SAP BusinessObjects Design Studio to display this selection on a crosstab, it can be achieved through a workaround using CSS.

In the following steps I will show, how you can create a crosstab in SAP BusinessObjects Design Studio and configure the first row of the crosstab to be selected as part of the startup of the application.

1. Insert a crosstab into the application and set its layout properties. Rename the crosstab as required. I have named it as ‘CROSSTAB_1’.Set the top margin to the value 138, set the left margin to the value 300, set the bottom and the right margin to the value ‘auto’. Set the width and length to the values 500 and 400.

2. Set the property "Selection Enabled" to the value "True".

3. Assign a data source to the crosstab in the data binding property of the crosstab. For our example I am using a BEx query from SAP BW. This query brings the Order Amounts per Item Category across 3 years – 2007, 2008 and 2009 (You should be able to see this in the screenshot itself).

4. Save the following CSS script as a separate style sheet (create a notepad file and save it as css). If you are working on the Local Mode, you will have to save this file in the repository (where your application itself is saved). If you are working on the BusinessObjects Platform mode, you can save your application in any folder on your local system – we will access it in the next step to upload the application on the platform.

5. Upload this style sheet to the SAP BusinessObjects BI Platform using the property "Custom CSS" of your application (for more about CSS: ).

To upload:

The script above uses a base class and a sub-class. As you can see I created a CSS class ".one" which has a property background-color. ".one" is the base class. The subclasses used here,". sapzencrosstab-RowHeaderArea", ".sapzencrosstab-HeaderRow" and ".sapzencrosstab-DataArea" are the default classes provided by SAP BusinessObjects Design Studio. (The list of around 300 default CSS classes is explained here )

The CSS above will highlight the first row / second dimension column and the first measure row in blue #7bc3ef as mentioned in the code (.sapzencrosstab-RowHeaderArea tr:nth-child(1).sapzencrosstab-HeaderRow td:nth-child(2))

Note: When you select a row, only the cell before the measure / key figure in that row is highlighted.

To highlight the adjoining measure/key figure cell, modify the CSS classes .sapzencrosstab-SelectColHeaderCell, .sapzencrosstab-SelectRowHeaderCell and .sapzencrosstab-SelectDataCell as follows and save it in the same stylesheet (defaultselection.css):

Here, one rule (i.e. background property) is applied to multiple classes. These classes are connected by a comma separator.

6. Open the properties of the Crosstab. Navigate to the property CSS Class in the Display area.

7.  Assign the value "one" to the CSS Class property.

8. Navigate to the On Select property in the Events area. Use the button to open the Script Editor.

9.  Enter the following Script and click OK:

CROSSTAB_1.setCSSClass("");

This script will set the property "CSS Class" of the crosstab to the value null, each time a selection is being made in the crosstab.

10. Now run the application to view the output.

The application with crosstab default selection implemented would look like this:

Source:

Hi Haripriya,

Thanks for sharing this very useful technique.  In my scenario I only have one dimension column as shown below:

Since you mention that the CSS "will highlight the first row / second dimension column", I adapted it as follows:

.one .sapzencrosstab-RowHeaderArea tr:nth-child(1).sapzencrosstab-HeaderRow td:nth-child(1)

{

background-color: #7bc3ef !important;

}

However, the first row is still not highlighted by default when the application starts up when running in local mode.  Do you have any suggestions?

Thanks,

Mustafa.

Hi Mustafa,

This is a very valid and useful question. I applied the CSS to two scenarios:

1. Having a dimension column and a measure column

.one .sapzencrosstab-RowHeaderArea tr:nth-child(1).sapzencrosstab-HeaderRow td:nth-child(1){

background: #7bc3ef !important;

}

.one .sapzencrosstab-DataArea tr:nth-child(1) td {

background: #7bc3ef !important;

}

I saved the above CSS code as a custom stylesheet and entered the CSS class as 'one' to the crosstab.

As you can see in the image below, the first row is highlighted.

Screenshot taken during application startup in local mode:

2. Having only one dimension in the column (as in your case)

I applied the following CSS :

.one .sapzencrosstab-RowHeaderArea tr:nth-child(1).sapzencrosstab-HeaderRow td:nth-child(1){

background: #7bc3ef !important;

}

This is same as the code you had written. However, this seems to work for me.

I saved the above CSS code as a custom stylesheet and entered the CSS class as 'one' to the crosstab.

As you can see below, the first row is highlighted.

During Application startup in local mode:

Please try the code given above and let me know if this works for you

Thanks,

Haripriya

Hi Haripriya,

Thanks for the prompt and detailed response, from which I realised that I had forgotten to enter "one" as the crosstab CSS Class property.  It is now working as desired

Regards,

Mustafa.

Hello Haripriya,

I'm trying to use your scripts and get the selected data using "getMembers" from the Crosstab elements (with instruction : var COLUMN = CROSSTAB_1.getSelectedMembers( "");).

This does not work at first until I select a row in the Crosstab myself, as if no row or cells are initially selected.

Can you please tell me if the row is actually selected in your scenario? And if the selected line data can be retrieved and used for other means?

Thanks for your help

André

Hi Andre,

发表评论
验证码: 点击我更换图片

注:网友评论仅供其表达个人看法,并不代表本站立场。

热门文章

  • 云存储_企业邮箱是怎么申请_便宜的
    <strong>云存储_企业邮箱是怎么申请_便宜的</strong>

    云存储_企业邮箱是怎么申请_便宜的

    雪花数据仓库中的端到端加密2016年4月13日作者:马丁·亨切尔彼得·波维尼克云数据安全,工程作者:马丁·亨切尔和彼得·波维尼克。保护客户数据是雪花...

  • 分布式数据库_八度网络云主机_便宜的
    <strong>分布式数据库_八度网络云主机_便宜的</strong>

    分布式数据库_八度网络云主机_便宜的

    在云数据库服务的世界里,对客户来说,没有什么比不间断地访问他们的数据更重要的了。在在线游戏和金融服务等交易率较高的行业,即使是最小的中断...

  • 数据库服务器_服务器带宽_哪家好
    <strong>数据库服务器_服务器带宽_哪家好</strong>

    数据库服务器_服务器带宽_哪家好

    图1。派特法是一家领先的油田服务公司派特法为能源客户锁定价值派特法设计、建造、运营和维护石油、天然气和可再生能源资产。公司致力于数字化转型...

  • MySQL数据库_不能用邮箱注册企业邮箱吗
    <strong>MySQL数据库_不能用邮箱注册企业邮箱吗</strong>

    MySQL数据库_不能用邮箱注册企业邮箱吗

    如今,企业被迫维护两种类型的分析系统:数据仓库和数据湖。数据仓库提供了有关业务健康状况的重要见解。数据湖可以发现客户、产品、员工和流程的...

  • 微软云_服务器售后_年度促销
    <strong>微软云_服务器售后_年度促销</strong>

    微软云_服务器售后_年度促销

    使用Azure的客户管理密钥进行数据加密2019年9月6日|3分钟读取作者:保卢斯雪花新闻,雪花科技2017年,雪花宣布使用AWS密钥管理服务(KMS)支持客户管理密...

云储存

更多 >
  • <strong>微软云_最后的灰姑娘百度云_排行榜</strong>
    微软云_最后的灰姑娘百度云_排行榜

    SAP Lumira的1.25版现在有一个Universe查询面板扩展,您需要安装它。安装后,您将看到熟悉的查询面板。您不需要"发布"到BI平台,而需要对BI平台执行"文件>另...

  • <strong>网站空间_斗破苍穹动漫第二季百度云_哪</strong>
    网站空间_斗破苍穹动漫第二季百度云_哪

    如果你读过我以前的博客,那么你就知道如何创建一个定制报告程序,根据映射表自动分析APO中的CIF后处理记录,并从阻塞的队列/记录中提取错误消息号。...

云储存游戏服务器_滨州网站建设_学生机
云储存网站空间_申报数据库_怎么样
云储存文件存储_rms服务器_免费1年
云储存微软云_哪家企业邮箱好_精选特惠
云储存企业网站_宁波网站建设哪家好_9元