If you are unable to create a new account, please email support@bspsoftware.com

 

[Closed] Is a Master-Detail Relationship possible in a Repeater?

Started by sleepy, 29 May 2006 03:35:24 AM

Previous topic - Next topic

sleepy

I have a master-detail relationship report (i.e., I have inserted a list containing details [DETAIL] into a list containing related information [MASTER]).

However, when I convert the list [MASTER] to a repeater I am unable to create a Repeater Report of anything other than 1x1. Does anyone know what I might be doing wrong?


And has anyone created a Repeater Report comprising more two or more queries (e.g., List 1 + List 2, ââ,¬Â¦.Ã,  or List 1 + Chart 1).

Cheers,
sleepyÃ,  ;D

BIsrik

I just did a sample report of ur requirement. Check if this what u wanted..I have pasted the xml specification..Its on gosales and goretailers package..

Srik

<report xml:lang="en-us" xmlns="http://developer.cognos.com/schemas/report/1/"><!--RS:1.1.230.2-->
   <modelConnection name="/content/package[@name='GO Sales and Retailers']/model[@name='model']"/>
   <querySet xml:lang="en-us">
      <BIQuery name="Query1">
         <cube><factList><item refItem="Product type" aggregate="none" isHeader="true"/></factList></cube>
      <tabularModel><dataItem name="Product type" aggregate="none"><expression>[gosales_goretailers].[Products].[Product type]</expression></dataItem></tabularModel><detailQuery refQuery="Query2"><linkFilter><condition>[Query1].[Product type]=[Query2].[Product type]</condition></linkFilter></detailQuery><detailQuery refQuery="Query3"><linkFilter><condition>[Query1].[Product type]=[Query3].[Product type]</condition></linkFilter></detailQuery></BIQuery>
   <BIQuery name="Query2"><cube><factList><item refItem="Product name" aggregate="none"/><item aggregate="none" refItem="Product type"/><item refItem="Description" aggregate="none"/></factList></cube><tabularModel><dataItem name="Product name" aggregate="none"><expression>[gosales_goretailers].[Products].[Product name]</expression></dataItem><dataItem name="Product type" aggregate="none"><expression>[gosales_goretailers].[Products].[Product type]</expression></dataItem><dataItem name="Description" aggregate="none"><expression>[gosales_goretailers].[Products].[Description]</expression></dataItem></tabularModel></BIQuery><BIQuery name="Query3"><cube><factList><item refItem="Product type" aggregate="none"/><item refItem="Quantity" aggregate="none"/><item refItem="Unit cost" aggregate="none"/></factList></cube><tabularModel><dataItem name="Product type" aggregate="none"><expression>[gosales_goretailers].[Products].[Product type]</expression></dataItem><dataItem name="Quantity" aggregate="total"><expression>[gosales_goretailers].[Orders].[Quantity]</expression></dataItem><dataItem name="Unit cost" aggregate="average"><expression>[gosales_goretailers].[Orders].[Unit cost]</expression></dataItem></tabularModel></BIQuery></querySet>
   <layoutList>
      <layout>
         
      <pageSet>
            
         <page name="Page1">
               <pageBody>
                  <repeater across="2" down="3" refQuery="Query1">
                     <style>
                        <CSS value="border-collapse:collapse"/>
                     </style>
                     <repeaterBody>
                        <style>
                           <CSS value="padding:3mm"/>
                        </style>
                     <textItem><queryItemRef refItem="Product type"/></textItem>
                        <list refQuery="Query2">
                           <listColumnTitles><listColumnTitle><textItem><queryItemRef refItem="Product name" content="label"/></textItem></listColumnTitle><listColumnTitle><textItem><queryItemRef refItem="Description" content="label"/></textItem></listColumnTitle></listColumnTitles>
                           <listColumns><listColumn><textItem><queryItemRef refItem="Product name"/></textItem></listColumn><listColumn><textItem><queryItemRef refItem="Description"/></textItem></listColumn></listColumns>
                           <style>
                              <CSS value="border-collapse:collapse"/>
                           </style>
                           <XMLAttribute name="RS_ListGroupInfo" value=""/></list>
                     <list refQuery="Query3">
                           <listColumnTitles><listColumnTitle><textItem><queryItemRef refItem="Product type" content="label"/></textItem></listColumnTitle><listColumnTitle><textItem><queryItemRef refItem="Quantity" content="label"/></textItem></listColumnTitle><listColumnTitle><textItem><queryItemRef refItem="Unit cost" content="label"/></textItem></listColumnTitle></listColumnTitles>
                           <listColumns><listColumn><textItem><queryItemRef refItem="Product type"/></textItem></listColumn><listColumn><textItem><queryItemRef refItem="Quantity"/></textItem><style><CSS value="text-align:right"/></style></listColumn><listColumn><textItem><queryItemRef refItem="Unit cost"/></textItem><style><CSS value="text-align:right"/></style></listColumn></listColumns>
                           <style>
                              <CSS value="border-collapse:collapse"/>
                           </style>
                        </list>
                     </repeaterBody>
                  </repeater>
               </pageBody>
               <pageHeader>
                  <block class="reportTitle">
                     <textItem class="reportTitleText">
                        <text/>
                     </textItem>
                  </block>
                  <style>
                     <CSS value="padding-bottom:10px"/>
                  </style>
               </pageHeader>
               <pageFooter>
                  <table>
                     <tableRow>
                        <tableCell>
                           <textItem>
                              <expression>AsOfDate()</expression>
                           </textItem>
                           <style>
                              <CSS value="vertical-align:top;text-align:left;width:25%"/>
                           </style>
                        </tableCell>
                        <tableCell>
                           <textItem>
                              <text>- </text>
                           </textItem>
                           <textItem>
                              <expression>PageNumber()</expression>
                           </textItem>
                           <textItem>
                              <text> -</text>
                           </textItem>
                           <style>
                              <CSS value="vertical-align:top;text-align:center;width:50%"/>
                           </style>
                        </tableCell>
                        <tableCell>
                           <textItem>
                              <expression>AsOfTime()</expression>
                           </textItem>
                           <style>
                              <CSS value="vertical-align:top;text-align:right;width:25%"/>
                           </style>
                        </tableCell>
                     </tableRow>
                     <style>
                        <CSS value="border-collapse:collapse;width:100%"/>
                     </style>
                  </table>
                  <style>
                     <CSS value="padding-top:10px"/>
                  </style>
               </pageFooter>
            </page></pageSet></layout>
   </layoutList>
</report>

sleepy

Srik,

Thanks. That was what I was trying to do.

If you dont mind could you briefly outline the steps you took and their order so I can better understand how you did it.

Cheers,
sleepyÃ,  ;D

BIsrik

Firstly a pulled up a column in the repeater. then a list and in the list, the parent column along with the child columns were inserted. Added the master detail constraint and executed the report.

Srik

sleepy

Srik,

THANK YOU for taking the time to explain how it all worked ... it now makes sense and I am able to duplicate your solution.

Cheers,
sleepyÃ,  ;D ;D