1、明白cognos报表控制报表控件的style存放于GlobalReportStyles.css文件中。其中ReportStudio用的存放于D:\Program Files\cognos\c8\webcontent\reportstyles目录下,而HTML页面用到的,存放于D:\Program Files\cognos\c8\webcontent\schemas目录下。
2、修改GlobalReportStyles.css文件,并同时发布到上述两个目录。
在文件末端增加如下style class:
div#tbl-container {position:absolute;left:21px;top:70px;width:800px;height:600px;overflow: auto;}/*高和宽可调*/
.lockrow /*列标题样式*/
{
vertical-align: top;
background-color: #BFD2E2;
border: 1px solid #93B1CD;
padding: 3px 5px;
position:relative;
top: ElementById("tbl-container").scrollTop); /*IE5+ only*/
z-index: 1;
top: ElementById("tbl-container").scrollTop); /*IE5+ only*/
z-index: 1;
}
.lockcolumn /*行标题样式*/
{
vertical-align: top;
background-color: #BFD2E2;
border: 1px solid #93B1CD;
padding: 3px 5px;
position:relative;
left: ElementById("tbl-container").scrollLeft); /*IE5+ only*/
z-index: 1;
{
vertical-align: top;
background-color: #BFD2E2;
border: 1px solid #93B1CD;
padding: 3px 5px;
position:relative;
left: ElementById("tbl-container").scrollLeft); /*IE5+ only*/
z-index: 1;
}
.lockcorner /*交叉表角样式*/
{
vertical-align: top;
background-color: #BFD2E2;
border: 1px solid #93B1CD;
padding: 3px 5px;
position:relative;
cssclass属性 top: ElementById("tbl-container").scrollTop); /*IE5+ only*/
left: ElementById("tbl-container").scrollLeft); /*IE5+ only*/
z-index: 2; /*务必大于列标题样式和行标题样式中的值,表示置于顶层的含义*/
{
vertical-align: top;
background-color: #BFD2E2;
border: 1px solid #93B1CD;
padding: 3px 5px;
position:relative;
cssclass属性 top: ElementById("tbl-container").scrollTop); /*IE5+ only*/
left: ElementById("tbl-container").scrollLeft); /*IE5+ only*/
z-index: 2; /*务必大于列标题样式和行标题样式中的值,表示置于顶层的含义*/
}
3、应用于list组件。
在需要的固定表头的list组件上方,插入Html Item。内容为:<div id="tbl-container">
在list组件下方,插入Html Item。内容为:</div>
将表头行选中,其属性最底端,class属性值,选择lockrow。
4、应用于crosstab组件
在需要的固定表头的crosstab组件上方,插入Html Item。内容为:<div id="tbl-container">
在crosstab组件下方,插入Html Item。内容为:</div>
将列标题行选中,其属性最底端,class属性值,选择lockrow。
将行标题列选中,其属性最底端,class属性值,选择lockcolumn。
将交叉表角选中,其属性最底端,class属性值,选择lockcorner。
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论