Create a report specification for your custom
report template by using Report Studio.
Procedure
- Open Report Studio.
- Create a new report.
For more information,
see the IBM® Cognos® Report Studio User Guide.
- From the File menu, click Convert
to Template.
- From the Tools menu, click Copy
Report to Clipboard to save the report specification XML.
- Paste the report specification into an XML editor or text
editor.
- 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.
- Add a new template element as a parent
of the report element.
- 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.
- 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>