Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report template within ReportNet 1

Status
Not open for further replies.

Jmayhair

IS-IT--Management
Oct 4, 2004
23
US
When you create a new report within Report Studio, you are prompted for what type of report: List, Crosstab, ect.

I would like to create a template for the report writers, that will already have some of the standard goodies. I would like to create a template that would have the company logo, report title and date. And add this the template to the list of available options when prompted. The current report normally used is a List report.

Has anyone done anything along these lines?
 
Hi,

Sadly (or excitingly?) this involves editing xml definition files on the ReportNet Server. Look in Program Files\Cognos\crn\webcontent\pat and you will find AppComponents.xml and templates.xml. You will need to edit both of these to define the new template layout and add it to the list displayed when you create a new report. Take copies of both before you start!
If you're not a whizz with xml, make the required layout changes in a new standard list report in Report Studio, then copy the definion to the clipboard (tools/copy report to clipboard). Paste this definition into wordpad, and look for your changes in the xml code. Next open templates.xml in wordpad, and start by locating the code between (and including) <template name=list> and it's corresponding </template> tag. Copy this code, and paste it in again so you now have two sets of code for a list template. Rename the opening tag for the second copy to <template name=mylist> (or use a different name not already in use as a template name), then work through the xml code between this and it's </template> tag and modify the code to reflect any changes you identified in the xml of your list report (probably between the pageheader tags). You now have an xml template definition for your customised list, next you need to add an entry for it in AppComponents.xml. Save templates.xml, then open AppComponents.xml in wordpad. Identify the line of code ending with 'templateName="List"/>' (near the top), copy it, and paste it in again underneath. Modify the copied line as follows:
<ListItem label="Modified List" icon="icon_list.gif" templateName="mylist"/>
where the template name at the end is the name you used in the opening tag of your template in templates.xml. Note that the code here uses 'label=' and not 'idsLabel=' and it's case sensitive too, so don't use 'Label=' [I've struggled with that one before!] If you want a different picture displayed for your template, copy the picture you want to use into Program Files\Cognos\crn\webcontent\pat\images and change the icon in the above code to the name of your picture.
Once you've saved away AppComponents.xml, start up Report Studio again and when you create a new report, your new template should be available for use. If you ever need to put things back to the way they were, simply copy the original templates.xml and AppComponents.xml back into the pat folder.

Happy editing!

MF.
 
Thanks, I'm going to give this a shot!

James "Have a Nice day
 
mfgf,

You were a big help... I have modifitied both files and I can get to my new template. I do however get an error "String ID not found: LDS_LB_NEW_Report"

Did you recieve this error as well?

James "Have a Nice day
 
mfgf,

I read your reply for the second time and found my answer in your first reply.

James "Have a Nice day
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top