TimeTraces comes with several report templates pre-installed. The available templates are described on the Report look and layout page. You can customize these existing report templates or create new report templates for yourself. The report templates are installed in the "Report templates" subfolder in the TimeTraces application folder (most commonly located at "C:\Program Files\TimeTraces\Report templates"). The report templates are translated in all supported languages; each language's set of templates are located in its own subfolder. When you want to use additional report templates you have to place them in these folders.
Report templates consist of two files; a settings file and a content file. The settings file must have the ".ttr" extension; you are however free to name the content file as you like.
The templates that are located in the report template folder are presented as possible choices in the "Generate report" window. Included with the help pages are also some sample templates you can base your own templates on. You can find these in your TimeTraces application installation folder in the subfolder "Help\EN\Report samples". They show you how to work with the different file formats, but they will probably need customization to fit your needs.
The report settings file is a regular Windows INI file. It needs to have a section called "[Settings]", in which all settings are listed. All settings need to be specified. The available settings are:
Categorization | The list of (sub)categories the template is listed under in the template selection tree in the "Generate report" window. The (sub)categories in the categorization need to be separated by a single backslash (\). The number of subcategories is limitless. You are free to re-use existing (sub)category names, but you can also use new ones. |
---|---|
Description | A description of the template that is shown when the template is selected in the "Generate report" window. |
Format | The format with which to write out the data. . Use the correct setting for the desired output format. |
FileNameType | Name of the type of file this report template creates. This name will be used when browsing for a destination file in the "Generate report" window. |
DefaultExtension | The default extension for the type of file this report template creates. This extension will be used when browsing for a destination file in the "Generate report" window. |
ContentFile | The file name of the file containing the content template of the report. There are no restrictions on this file name. |
The used report format encoding dictates how the data will be written out. The data will be processed and/or encoded to fit the desired output format when needed. The available formats are:
csv | Comma separated value |
---|---|
tab | Tab delimited |
html | HTML |
xml | XML |
txt | Plain text |
rtf | Rich text format |
The content of the report will be built up dynamically by filling in tags and tag sections in the report content template. All tags are placed between "[#" and "#]" marks, like [#tagname#]. Tags are case sensitive and whitespace is not allowed in them. There are a couple of groups of tags you can use.
Some tags form tag sections. These are used for writing out all the activities, time periods and time values in the report. These sections are used to mark an entire block of content to be filled in repeatedly for each item in the set they represent; they thus enable you to e.g. list all used activities and write out the time values as a table. Section tag names end with "startsection" and "endsection" and must be used in pairs.
There are several modes in which activities and time period sections will write out their items. This is denoted by writing the mode after the section start name between "(" and ")" characters, like [#activity_startsection(user)#]. The available modes per tag are mentioned in the documentation for the tag by listing all modes between "(" and ")", like "(all, user, used)". The following modes are recognized:
all | Include all items in the section. |
---|---|
used | Only include the items on which time is registered. |
user | Only include the items on which time is registered or when the user wants to see empty items. |
used_insection | Only include the items on which time is registered in the current top level section item (used for nested sections). |
user_insection | Only include the items on which time is registered in the current top level section item or when the user wants to see empty items (used for nested sections). |
The "user" and "user_insection" versions reflect the user's choice; he can opt to not include empty activities and/or empty time periods in the "Generate report" window (the report options "Include empty activities" and "Include empty time periods").
Another distinction exists between "(roundsum)" and "(sumround)" tag modes; this is indicated by "(roundsum, sumround)". There is a difference in the final result between rounding values before summing them up versus summing up values and then rounding the result. Both versions are useful in reports. The "(roundsum)" mode represents results that are summed over rounded values, and the "(sumround)" mode represents results that are rounded after summing the values.
A tag or tag pair can occur more than one time in the content template. Every occurrence will be filled in independently, which allows you to e.g. create both a header and a footer row using the same "activities" section tag pair.
The available report option tags are:
[#reportoption_statisticsper#] | The "statistics per" option in the "Data handling" section in the "Generate report" window. The possible values are: "hour", "day", "week", "month", "year" and "total project". |
---|---|
[#reportoption_roundingby#] | The "Round off to" option in the "Data handling" section in the "Generate report" window. The possible values are: "second", "minute", "6 minutes", "quarter of an hour", "half hour" and "hour". |
[#reportoption_dataformat#] | The "Format" option in the "Data handling" section in the "Generate report" window. The possible values are: "numeric hours", "numeric days" and "time". |
Available project detail tags are:
[#project_name#] | The name of the project. |
---|---|
[#project_filename#] | The file name of the project. |
[#project_filepath#] | The total file path of the project. |
The chosen time period for the report is divided into discrete separate sub time periods according to the "Statistics per" reporting option. The tags for the details on these sub time period periods are:
[#timeperiod_firststart(all, used, user)#] | The start of the first sub time period in the reporting time period. |
---|---|
[#timeperiod_lastend(all, used, user)#] | The end of the last sub time period in the reporting time period. |
The total time registered in the report is available via the tags:
[#report_totaltime(roundsum, sumround)#] | The total cumulative time registered in the report. |
---|
The set of activities can be written out by a tag pair. The tag pair is:
[#activity_startsection(all, used, user)#] | The start of the activity section. |
---|---|
[#activity_endsection#] | The end of the activity section. |
Within an activity section you can write out the activity's characteristics via the following tags:
[#activity_name#] | The name of the activity. |
---|---|
[#activity_path#] | The total path of the activity. |
[#activity_nr#] | The sequence number of the activity in the set. |
[#activity_id#] | The activity's unique ID in this report. |
[#activity_totaltime(roundsum, sumround)#] | The total time registered on the activity. |
Within an activity section you can also write out the details of each time period via the following tag pair:
[#activity_timeperiod_startsection(all, used, used_insection, user, user_insection)#] | The start of the time period section. |
---|---|
[#activity_timeperiod_endsection#] | The end of the time period section. |
Within an activity time period section you can write out the details of that time period and the time registered on that activity in that time period via the following tags:
[#activity_timeperiod_time#] | The time per activity per time period. |
---|---|
[#activity_timeperiod_start#] | The start date/time of the time period. |
[#activity_timeperiod_end#] | The end date/time of the time period. |
[#activity_timeperiod_nr#] | The sequence number of the time period in the set. |
[#activity_timeperiod_id#] | The time period's unique ID in this report. |
[#activity_timeperiod_totaltime(roundsum, sumround)#] | The total time registered on the time period. |
The set of time periods can be written out by a tag pair. The tag pair is:
[#timeperiod_startsection(all, used, user)#] | The start of the time period section. |
---|---|
[#timeperiod_endsection#] | The end of the time period section. |
Within a time period section you can write out the time period's characteristics via the following tags:
[#timeperiod_start#] | The start date/time of the time period. |
---|---|
[#timeperiod_end#] | The end date/time of the time period. |
[#timeperiod_nr#] | The sequence number of the time period in the set. |
[#timeperiod_id#] | The time period's unique ID in this report. |
[#timeperiod_totaltime(roundsum, sumround)#] | The total time registered on the time period. |
Within a time period section you can also write out the details of each activity via the following tag pair:
[#timeperiod_activity_startsection(all, used, used_insection, user, user_insection)#] | The start of the activity section. |
---|---|
[#timeperiod_activity_endsection#] | The end of the activity section. |
Within a time period activity section you can write out the details of that activity and the time registered in that time period on that activity via the following tags:
[#timeperiod_activity_time#] | The time per time period per activity. |
---|---|
[#timeperiod_activity_name#] | The name of the activity. |
[#timeperiod_activity_path#] | The total path of the activity. |
[#timeperiod_activity_nr#] | The sequence number of the activity in the set. |
[#timeperiod_activity_id#] | The activity's unique ID in this report. |
[#timeperiod_activity_totaltime(roundsum, sumround)#] | The total time registered on the activity. |
The above information is a bit abstract, so here is an example to help you on your way. The template below writes out a CSV data file.
Line 1 | Start,End[#activity_startsection(user)#],[#activity_path#][#activity_endsection#],Total time[#timeperiod_startsection(user)#] |
---|---|
Line 2 | [#timeperiod_start#],[#timeperiod_end#][#timeperiod_activity_startsection(user)#],[#timeperiod_activity_time#][#timeperiod_activity_endsection#],[#timeperiod_totaltime(roundsum)#][#timeperiod_endsection#] |
[#activity_startsection(user)#]
tag, and the second objective via the [#timeperiod_startsection(user)#]
tag.[#activity_startsection(user)#]
and [#activity_endsection#]
tag pair that writes out all activities in the report. This composes the part of the header including the activity details.
[#activity_path#]
tag.[#timeperiod_startsection(user)#]
and [#timeperiod_endsection#]
tags. Since the first data row needs to be separated from the header anyway, it is best to use the line ending at the end of the header for this. On the same line following the header is thus the [#timeperiod_startsection(user)#]
tag with nothing but the line ending following it.[#timeperiod_start#]
and [#timeperiod_end#]
tags. They need to be separated with a comma.[#timeperiod_activity_startsection(user)#]
and [#timeperiod_activity_endsection#]
tag pair instead. Each time value is written out by the [#timeperiod_activity_time(roundsum)#]
tag.\cellx[#activity_nr#]00
").