首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Cognos11-单列列表包装

Cognos11-单列列表包装
EN

Stack Overflow用户
提问于 2020-02-20 22:55:49
回答 1查看 128关注 0票数 0

我有一个报告,它有一个列列表报告,该报告是根据数据项划分的。我想要做的是让一栏在水平方向上继续,而不是垂直方向,这样它就可以放在一页上。我试着使用中继器和中继器表,但它没有给出预期的结果。我附上了一张图片,它看起来像什么,我希望它看起来像更好地说明我想做什么。我希望避免使用多个查询,并让报告完成大量繁重的列表工作,因为可以添加/删除新的标头,并且可以更改下面的名称,因此我希望尽可能避免手动干预。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-02-21 01:15:21

具有主详细关系的双中继器表很可能是可行的。

代码语言:javascript
运行
复制
            <drillBehavior/>
            <layouts>
                <layout>
                    <reportPages>
                        <page name="Page1">
                            <style>
                                <defaultStyles>
                                    <defaultStyle refStyle="pg"/>
                                </defaultStyles>
                            </style>
                            <pageBody>
                                <style>
                                    <defaultStyles>
                                        <defaultStyle refStyle="pb"/>
                                    </defaultStyles>
                                </style>
                                <contents><repeaterTable across="2" name="Repeater table1" refQuery="Header">
        <repeaterTableCell>
            <contents><table><style><defaultStyles><defaultStyle refStyle="tb"/></defaultStyles><CSS value="border-collapse:collapse;height:100%"/></style><tableRows><tableRow><tableCells><tableCell><contents><table><style><defaultStyles><defaultStyle refStyle="tb"/></defaultStyles><CSS value="border-collapse:collapse;height:100%"/></style><tableRows><tableRow><tableCells><tableCell><contents><textItem><dataSource><dataItemValue refDataItem="Product line"/></dataSource></textItem></contents><style><CSS value="text-align:left;vertical-align:top"/></style></tableCell></tableCells></tableRow></tableRows></table><repeaterTable name="Repeater table2" refQuery="Detail" across="1">
        <repeaterTableCell>
            <contents><textItem><dataSource><dataItemValue refDataItem="Product type"/></dataSource></textItem></contents>
            <style>
                <CSS value="padding:4px"/>
                <defaultStyles>
                    <defaultStyle refStyle="rc"/>
                </defaultStyles>
            </style>
        </repeaterTableCell>
        <style>
            <CSS value="border-collapse:collapse"/>
            <defaultStyles>
                <defaultStyle refStyle="rt"/>
            </defaultStyles>
        </style>
    <masterDetailLinks><masterDetailLink><masterContext><dataItemContext refDataItem="Product line"/></masterContext><detailContext><dataItemContext refDataItem="Product line"/></detailContext></masterDetailLink></masterDetailLinks></repeaterTable></contents><style><CSS value="text-align:left;vertical-align:top"/><defaultStyles><defaultStyle refStyle="GuidedLayoutRightPadding"/></defaultStyles></style></tableCell><tableCell><contents/><style><CSS value="text-align:left;vertical-align:top"/></style></tableCell></tableCells></tableRow></tableRows></table></contents>
            <style>
                <CSS value="padding:4px"/>
                <defaultStyles>
                    <defaultStyle refStyle="rc"/>
                </defaultStyles>
            </style>
        </repeaterTableCell>
        <style>
            <CSS value="border-collapse:collapse"/>
            <defaultStyles>
                <defaultStyle refStyle="rt"/>
            </defaultStyles>
        </style>
    </repeaterTable></contents>
                            </pageBody>
                        </page>
                    </reportPages>
                </layout>
            </layouts>
        <queries><query name="Header"><source><model/></source><selection><dataItem aggregate="none" rollupAggregate="none" name="Product line"><expression>[Sales (query)].[Products].[Product line]</expression><XMLAttributes><XMLAttribute output="no" name="RS_dataType" value="3"/><XMLAttribute output="no" name="RS_dataUsage" value="0"/></XMLAttributes></dataItem></selection></query><query name="Detail"><source><model/></source><selection><dataItem aggregate="none" rollupAggregate="none" name="Product line"><expression>[Sales (query)].[Products].[Product line]</expression><XMLAttributes><XMLAttribute output="no" name="RS_dataType" value="3"/><XMLAttribute output="no" name="RS_dataUsage" value="0"/></XMLAttributes></dataItem><dataItem aggregate="none" rollupAggregate="none" name="Product type"><expression>[Sales (query)].[Products].[Product type]</expression><XMLAttributes><XMLAttribute output="no" name="RS_dataType" value="3"/><XMLAttribute output="no" name="RS_dataUsage" value="0"/></XMLAttributes></dataItem></selection></query></queries><XMLAttributes><XMLAttribute output="no" name="RS_CreateExtendedDataItems" value="true"/><XMLAttribute output="no" name="listSeparator" value=","/><XMLAttribute output="no" name="decimalSeparator" value="."/></XMLAttributes><classStyles><classStyle name="GuidedLayoutLeftPadding"><CSS value="padding-left:5px;border-top-width:1px;border-bottom-width:1px;border-left-width:1px;border-right-width:1px"/></classStyle><classStyle name="GuidedLayoutTopPadding"><CSS value="padding-top:5px;border-top-width:1px;border-bottom-width:1px;border-left-width:1px;border-right-width:1px"/></classStyle><classStyle name="GuidedLayoutRightPadding"><CSS value="padding-right:5px;border-top-width:1px;border-bottom-width:1px;border-left-width:1px;border-right-width:1px"/></classStyle><classStyle name="GuidedLayoutBottomPadding"><CSS value="padding-bottom:5px;border-top-width:1px;border-bottom-width:1px;border-left-width:1px;border-right-width:1px"/></classStyle><classStyle name="GuidedLayoutMargin"><CSS value="margin-bottom:10px"/></classStyle></classStyles><modelPath>/content/folder[@name=&apos;Samples&apos;]/folder[@name=&apos;Models&apos;]/package[@name=&apos;GO sales (query)&apos;]/model[@name=&apos;model&apos;]</modelPath></report>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60322727

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档