Add the Custom Template Information to the Resources.xml File

The Resources.xml file defines the content of the new report dialog box in Report Studio.

You must modify this file by adding the information that refers to the custom report template.

For the listItems element, you add a new listItem element that represents the new template. The listItem element must have the following attributes.

Table 1. listItem attributes required when you edit the resources.xml file

Attribute

Description

idsLabel

Specifies an ID that refers to a Report Studio string resource file, such as reportstudio_en.xml or reportstudio_fr.xml, located in the c10_location/webcontent/pat/res directory, and a label for the template that appears in the new report dialog box.

Use this attribute when you want to translate the label into other languages. If you do not wantto translate the label, use the label attribute instead.

label

Specifies a label for the template that appears in the new report dialog box.

Use this attribute instead of the idsLabel attribute for the custom template when you do not want to translate the label into other languages, which eliminates the need to use the string resource files, such as reportstudio_en.xml or reportstudio_fr.xml, in the c10_location/webcontent/pat/res directory.

icon

Specifies an image file located in the c10_location/webcontent/pat/images directory that is associated with the template. The image appears as an icon in the new report dialog box.

Use a previously created image file for the custom report template.

templateName

Specifies the name of the custom report template.

Procedure

  1. Open the Resources.xml.

    This file is located in the c10_location/webcontent/pat/res.

  2. Add a new listItem element using one of the following attributes for the custom report template:
    • label, if you do not want to translate the label into other languages
    • idsLabel, if you want to translate the label into other languages

    Ensure that the templateName attribute is the same as specified when creating the report specification for the custom report template.

    Here is an example of the edited Resources.xml file:

    <listView id="New" view="icon" clipLabels="false">
    		<listItems>
    			<!-- Start custom templates-->
                <listItem label="List_Corporate" 
                icon="icon_list_corp.gif" templateName="
    List_corporate"/>
                <listItem label="Crosstab_Corporate" 
                icon="icon_crosstab_corp.gif"
    templateName="Crosstab_Corporate"/>
                <listItem label="Blank_Corporate" icon="icon_blank_corp.gif"
    templateName="Blank_Corporate"/>
                <!-- End custom templates-->
    			<listItem idsLabel="IDS_LBL_NEW_BLANK_REPORT" icon="icon_blank.gif"
    templateName="Blank"/>
    			<listItem idsLabel="IDS_LBL_NEW_LIST_REPORT" icon="icon_list.gif"
    templateName="List"/>
    			<listItem idsLabel="IDS_LBL_NEW_CROSSTAB_REPORT" icon="icon_crosstab.gif"
    templateName="Crosstab"/>
    			<listItem idsLabel="IDS_LBL_NEW_CHART_REPORT" icon="icon_chart.gif"
    templateName="Chart"/>
    			<listItem idsLabel="IDS_LBL_NEW_MAP_REPORT" icon="icon_map.gif" 
    			templateName="Map"/>
    			<listItem idsLabel="IDS_LBL_NEW_FINANCIAL_REPORT" 
    			icon="icon_financial.gif"
    templateName="Financial"/>
    			<listItem idsLabel="IDS_LBL_NEW_REPEATER_REPORT" icon="icon_repeater.gif"
    templateName="Repeater"/>
    			<listItem idsLabel="IDS_LBL_NEW_TEMPLATE_RT" icon="icon_template_qs.gif"
    templateName="Template_RT"/>
    			<listItem idsLabel="IDS_LBL_NEW_BROWSE" icon="browse_32x32.gif" 
    			idsTooltip="IDS_TOOLTIP_NEWBROWSE"
    isBrowse="true"/>
    		</listItems>
    	</listView>
  3. Save and close the file.

Results

You must now restart Report Studio and clear the cache of your Web browser for the custom report template to appear in the new report dialog box.