Using Report Studio

Create a report specification for your custom report template by using Report Studio.

Procedure

  1. Open Report Studio.
  2. Create a new report.

    For more information, see the IBM® Cognos® Report Studio User Guide.

  3. From the File menu, click Convert to Template.
  4. From the Tools menu, click Copy Report to Clipboard to save the report specification XML.
  5. Paste the report specification into an XML editor or text editor.
  6. Delete the following information, which Report Studio adds to the XML file and which is not necessary for the template:
    • The xmlns attribute of the report element.
    • The template attribute of the report element.
    • The value of the name attribute of the query element. Delete the value, but leave the double quotation marks.
    • The value of the name attribute of the page element. Delete the value, but leave the double quotation marks.
    • The value of the refQuery attribute of the list element.
  7. Add a new template element as a parent of the report element.
  8. Add a name attribute for the template element.

    The name you enter appears as the name of the template in the Report Studio new report dialog box.

  9. Save the report specification.

Results

Here is an example of the initial part of a report specification created in Report Studio. The portions to delete appear in bold.
 <template name="List_corporate"> 
   ...
   <report xmlns="http://developer.cognos.com/schemas/report/4.0/" 
expressionLocale="en" template="true"> 
<queries>
   <query name="Query1">
     <source>
        <model/>
     </source>
     <selection/>
   </query>
 </queries>
 <layouts>
   <layout>
    <reportPages>
      <page class="pg" name="Page1">
        <pageBody class="pb">
          <contents>
            <list class="ls" refQuery="Query1"> 
              <style>
                <CSS value="border-collapse:collapse"/>
              </style>
             </list>
               .................
   </report>
  </template>