Customizing the Inventory Tab
The list of reports that appears on the Inventory tab is customizable. You can:
Remove
reports.
Reorder
the list.
Change
report names (captions).
Add
separators between reports.
Change
the title of the reports list (by default, the title is “Reports”).
To customize the list of reports on the Inventory tab, edit the file tmplInventoryTab.rec, which is located in the folder
HelpDeskServer\CensusWeb\CUSTOMIZEDFILES
\#Project#helpdesk\#AllWebViews#\Misc
In templInventoryTab.rec, the reports list is stored in an array named arrReports. arrReports is an array of arrays, that is, each element in arrReports is itself an array. Each of these arrays contains information about a different report.
The following code fragment shows how a report is added to the list:
// start Reports list
arrReports = [
// array of report information
[ GetOpenReportOnClickFunction(...),
"<caption>", "<tooltip>", "<html-markup>" ]
] // end of Reports list
where:
GetOpenReportOnClickFunction(...) returns the onClick event handler, which opens the report when a user clicks it. Do not edit this function call.
<caption> is the report name displayed in the list.
<tooltip> is the text displayed when a user points to the button beside a report. In tmplInventoryTab.rec, the caption and tooltip are specified by text that looks like this:
<Mq:ReportCaption>155.10</Mq:ReportCaption>
When you generate a Web view, this text is replaced with the name of the report.
<html-markup> is HTML markup that is inserted into the list after the report. For example, you can add separators by adding “<hr />”.
To reorder the list of reports:
1 In tmplInventoryTab.rec, change the order in which the reports are added into the arrReports array.
2 Some reports add a separator (“<hr/>”), so you may have to edit the report arrays to put the separators in the right places.
3 Generate the Web views that include the Inventory tab.
To remove reports:
1 In tmplInventoryTab.rec, comment out (or delete) the reports that you want to remove.
2 Generate the Web views that include the Inventory tab.
To change a report name:
1 In tmplInventoryTab.rec, replace the text that looks like this:
"<Mq:ReportCaption>155.10</Mq:ReportCaption>"
with the report name you want to see.
Remember, the tooltip is the second element in the array, and the caption is the third.
2 Generate the Web view.
To add a separator between two reports:
1 In tmplInventoryTab.rec, find the array for the first of the two reports.
2 Change the fourth element of the report array from "" to "<hr/>" (or to whatever HTML you want to use as a separator).
3 Generate the Web views that include the Inventory tab.
To change the title of the reports list:
1 In tmplInventoryTab.rec, find this document.write statement (near the end of the file):
document.write(m_objWebPart.GetHTML_ListContainer("Reports","../../theme/images/images/ListImage.gif",arrReports));
2 Change the first argument to GetHTML_ListContainer() from “Reports” to the title you want to see.
3 Generate the Web views that include the Inventory tab.