| Version 6 (modified by katty1980, 19 years ago) |
|---|
Trac Reports
Table of Contents
The Trac reports module provides a simple, yet powerful reporting facility to present information about tickets in the Trac database.
Rather than have its own report definition format, TracReports relies on standard SQL SELECT statements for custom report definition.
A report consists of these basic parts:
- ID -- Unique (sequential) identifier
- Title -- Descriptive title
- Description -- A brief description of the report, in WikiFormatting text.
- Report Body -- List of results from report query, formatted according to the methods described below.
- Footer -- Links to alternative download formats for this report.
Changing Sort Order
Simple reports - ungrouped reports to be specific - can be changed to be sorted by any column simply by clicking the column header.
If a column header is a hyperlink (red), click the column you would like to sort by. Clicking the same header again reverses the order.
Alternate Download Formats
Aside from the default HTML view, reports can also be exported in a number of alternate formats. At the bottom of the report page, you will find a list of available data formats. Click the desired link to download the alternate report format.
Comma-delimited - CSV (Comma Separated Values)
Export the report as plain text, each row on its own line, columns separated by a single comma (','). Note: Column data is stripped from carriage returns, line feeds and commas to preserve structure.
Tab-delimited
Like above, but uses tabs (\t) instead of comma.
RSS - XML Content Syndication
All reports support syndication using XML/RSS 2.0. To subscribe to a , click the the orange 'XML' icon at the bottom of the page. See TracRss for general information on RSS support in Trac.
Creating Custom Reports
Creating a custom report requires a comfortable knowledge of SQL.
A report is basically a single named SQL query, executed and presented by Trac. Reports can be viewed and created from a custom SQL expression directly in from the web interface.
Typically, a report consists of a SELECT-expression from the 'ticket' table, using the available columns and sorting the way you want it.
Ticket columns
The ticket table has the following columns:
- id
- time
- changetime
- component
- severity
- priority
- owner
- reporter
- cc
- url
- version
- milestone
- status
- resolution
- summary
- description
See TracTickets for a detailed description of the column fields.
all active tickets, sorted by priority and time
Example: All active tickets, sorted by priority and time
See also: TracTickets, TracQuery, TracGuide
![(please configure the [header_logo] section in trac.ini)](/ModelGlue.com/trac.cgi/chrome/site/your_project_logo.png)