Classic Report Templates

This topic describes template files used to generate classic reports.

About Templates

StarTeam provides many Classic reports for each component that you can use as is or customize. Each report is generated using a series of template files that reside in the folder you designated during installation. For example, if you used the default installation path for the Cross-Platform Client on a Microsoft Windows platform, the Reports folder is c:\Program Files\Micro Focus\StarTeam Cross-Platform Client <version>\samples\details-templates\.

To customize the reports, you can open and edit the report templates in any text editor or HTML tool.

Back to top

Template Files

The template files provided for each report are listed below.

Default
<component>Default.Title
<component>Default.Name
<component>Default.GrpInfo
<component>Default.Group1
<component>Default.EndReport
Detail
<component>Detail.Title
<component>Detail.Name
<component>Detail.GrpInfo
<component>Detail.Group1
<component>Detail.EndReport
Detail with Description
<component>Detail with Description.Title
<component>Detail with Description.Name
<component>Detail with Description.GrpInfo
<component>Detail with Description.Group1
<component>Detail with Description.Group2
<component>Detail with Description.EndReport
Grouping Summary
<component>Grouping Summary.Title
<component>Grouping Summary.Name
<component>Grouping Summary.GroupSummary
<component>Grouping Summary.EndReport
History
<component>History.Title
<component>History.Name
<component>History.GrpInfo
<component>History.Group1
<component>History.Group2
<component>History.EndReport
Links
<component>History.Title
<component>Links.Name
<component>Links.GrpInfo
<component>Links.Group1
<component>Links.Group2
<component>Links.EndReport
Summary
<component>Summary.Title
<component>Summary.Name
<component>Summary.GrpInfo
<component>Summary.Group1
<component>Summary.EndReport
Summary with Description
<component>Summary with description.Title
<component>Summary with description.Name
<component>Summary with description.GrpInfo
<component>Summary with description.Group1
<component>Summary with description.EndReport

Back to top

Understanding the Template Files

The report template file names are composed as <component><name>.<type>. The table below describes each template file type.

.Title In the .Title templates, the report title is represented with the ~~ReportTitle~~ tag. In these templates, you might want to add your company’s logo, change the font or size, etc.
.GrpInfo The .GrpInfo templates contain information describing the group, which is represented as the ~~GroupingInfo~~ tag.
.Group1..9 The .Groupx files are processed in the numerical order in which they are found. The numbers do not have to be contiguous. The application searches for .Group1 through .Group9 as it creates a record for each item in the report. The names of the fields in the component are individually specified within the double tildes (~~). You must use the correct SQL name. The fields’ data will replace the SQL name and the double tildes. To appear in the report, all the specified fields must be displayed in the upper pane at the time the report is generated. Otherwise, those fields are skipped.
.GroupSummary The .GroupSummary templates are used when totalling the items in a group. The group is represented with the ~~GroupingInfo~~ tag.
.EndReport This template ends your report. It may include the following total tags: ~~TotalHistoryCount~~~~TotalRecordCount~~~~TotalLinkCount~~

Back to top

Customizing Classic Report Templates

You can customize Classic report templates. They are located in the folder you designated during installation. If you used the default path during installation, the Reports folder is c:\Program Files\Micro Focus\StarTeam Cross-Platform Client <version>\samples\details-templates\. Note that different clients and client installations on different operating systems will probably have different installation folders. You may need to put templates in more than one location. All the templates are in HTML format.

While creating custom templates, keep these things in mind:

  • A report typically consists of multiple template files, each using the naming convention <ComponentReportname.Purpose>. For example, the Default report provided for the Change Request component has five template files: ChangeDefault.Name, ChangeDefault.Title, ChangeDefault.GrpInfo, ChangeDefault.Group1, and ChangeDefault.EndReport.
  • A double tilde (~~) precedes and follows field names in reports. For example, in the ChangeDefault.Title and other “Title” template files, the field name ~~ReportTitle~~ is used.

  1. From the Reports folder, copy all report template files with the same root name to the Reports folder using a different root name.

    For example, if the Default report for the file component is the most similar to the new report you want to create, copy all FileDefault.x template files using a name like FileMYREPORT.x. In this case, you would create new files named FileMYREPORT.Name, FileMYREPORT.Title, and so on. In the Cross-Platform Client, the new report would appear in the Report dialog box with the name MYREPORT, along with the original Default report.

  2. Open and edit the new report template files in any text editor or HTML editor.

    Tip: A simple and easy method of creating and editing templates is to use Microsoft Word 97 or later, which includes automated HTML file generation.

  3. Save the report templates you edited.

Back to top

Customizing Fields in Classic Report Templates

You can change what fields appear in a Classic report by changing the fields specified in the report’s template. Fields must be specified in the templates using their internal identifier. This is usually different from their display name (which is used as the column header, the name displayed in a pane, and the name in the report).

Field names in the report template files are delimited by the characters “~~”. For example, ~~ReportTitle~~ appears in all of the x.Title report templates. In the Cross-Platform Client, whatever you type as the name of the report in the Reports dialog box becomes the title of the report.

Tip: To see all field display names, right-click the column header in the upper pane and choose Show Fields from the context menu.

  1. Open the report template file in your favorite text editor.
  2. Edit the file following standard HTML file conventions.
  3. Save the file.

    Note: If you want to create a new report template that has this new field, save the file with a new filename. All related report template files should be created with the same root filename.

For example, the TopicsSummary.Group1 template contains the following lines:

<TD WIDTH=450><FONT SIZE=”2”>~~Title~~</FONT></TD><TD WIDTH=0></TD>
<TD WIDTH=100><FONT SIZE=”2”>~~CreateUserID~~</FONT></TD><TD WIDTH=0></TD>
<TD WIDTH=120><FONT SIZE=”2”>~~CreatedTime~~</FONT></TD><TD WIDTH=0></TD>

If you wanted to add the Read Status field to this report, you would need to know that its internal identifier is ReadStatus. Then you might add the following line to the template:

<TD WIDTH=120><FONT SIZE=”2”>~~ReadStatus~~</FONT></TD><TD WIDTH=0></TD>

Remember that, even if you specify a field in a template, that field is skipped if it does not also appear as a column in the project view window’s upper pane. You might want to create filters for specific reports prior to creating the report.

Back to top