How to change the way dtSearch prints search results

Last Reviewed: August 4, 2013

Article: DTS0104

Applies to: dtSearch Desktop (all versions)

dtSearch generates a printable list of search results based on a template file, SearchListTemplate.rtf. The list generated from this file is then launched in your word processor, so you can edit or print it. If you select the "Report" format rather than the "List" format, then SearchReportTemplate.rtf is used.

Another way to save search results is to click File > Save Search Results As in dtSearch. This lets you save the search results list in XML or CSV (for importing into Excel).

To customize the template used to generate a search results list in RTF:

1. Use WordPad or Microsoft Word to open the file SearchListTemplate.rtf in your c:\Program Files\dtSearch\Template folder. You will see a document that looks like this:

 

Search Request: %%Request%%

     Total files: %%TotalFiles%%

     Total hits: %%TotalHits%%

 

<<<ListItem

%%Filename%% (%%Hits%% hits)

Location: %%Location%% Size: %%Size%% Last modified: %%Date%%

>>>

2. Edit the file to change the format and save the file as an RTF file. Do not save it as a DOC file because then dtSearch will not see the changes. Save the file in your dtSearch settings folder, not in the Template folder, so your changes will not be lost if you reinstall dtSearch. (Click Options > Change dtSearch Folder in dtSearch to find out where your settings folder is.)

dtSearch uses SearchListTemplate.rtf as a template to generate a printable version of the search results file. Text between the <<< and >>> markers defines the template for each search results item. Text before the first <<< marker is the header for printed search results. Text after the >>> marker is ignored.

For example, if you wanted to see the full path and filename for each document rather than just the name, you could edit the template and change %%Filename%% to %%Fullname%%.

The following symbols are used in this template:

 

Symbol

Meaning

%%Hits%%

Number of hits in the document

%%Filename%%

Name of the document. For PDF and HTML files, this will be the TITLE.

%%Fullname%%

Full path and filename of the document

%%Date%%

Modification date of the document

%%Location%%

Location of the document

%%Type%%

The file type (Microsoft Word, PDF, HTML, etc.

%%Size%%

Size of the document

%%SizeK%%

Size of the document in kilobytes

%%Title%%

First 80 text characters of the document

%%Ordinal%%

The number of this item in the search results list

%%IndexRetrievedFrom%%

The path of the index that this document was found in

%%SearchDate%%

The date the search was performed

%%ReportDate%%

The date the search report was generated

%%Request%%

Search request

%%TotalFiles%%

Number of files retrieved in the search

%%TotalHits%%

Number of hits in all files retrieved in the search