Custom reports may be viewed in Archive Explorer on the Reports tab or in Responder Explorer using the Generate Reports tool. All reports in Archive Explorer are defined in the ArchiveQueriesConfig.xml. Reports viewed in Responder Explorer are defined in DataQueriesConfig.xml.
To modify an existing report or create your own, you will need to edit ArchiveQueriesConfig.xml or DataQueriesConfig.xml. These files are installed with Responder Server. By default they are installed here: \Program Files\Miner and Miner\Responder\Server. Open them with any application that allows you to edit XML (e.g., Notepad, XML Spy).
The XML is grouped into several QueryPackages. In ArchiveQueriesConfig.xml, you will edit the ArchiveReports query package. In DataQueriesConfig.xml, look for the DataReports QueryPackage.
- Open the appropriate XML file (ArchiveQueriesConfig.xml or DataQueriesConfig.xml).
- Look for the QueryPackage key value that corresponds to the file you're editing. ArchiveQueriesConfig.xml: <QueryPackage Key="ArchiveReports">; DataQueriesConfig.xml: <QueryPackage Key="DataReports">. These sections contain a QueryClass section for each report available. When you add a QueryClass to this section, it will be included in the list of reports in either Archive Explorer or Responder Explorer.
- You can copy an existing QueryClass and manipulate it (easiest choice) or create your own (most room for error). Below is an example of a QueryClass in ArchiveQueriesConfig.xml.
XML Snippet |
Copy Code
|
1 <QueryClass Key="IncidentDateRange" Caption="Incidents by Date Range" Category="Browser">
2 <Properties>
3 <!--NOTE: DateTime format for xml file must be in SortableDateTimeFormat yyyy'-'MM'-'dd'T'HH':'mm':'ss-->
4 <b:Property Key="Description" Value="A tabular report of incidents with outage time within a date range."/>
5 <b:Property Key="BeginTime" Value="2007-01-01T00:00:00"/>
6 <b:Property Key="EndTime" Value="2007-12-31T23:59:00"/>
7 <b:Property Key="XSLPath" Value="%ALLUSERSPROFILE%\Application Data\Miner and Miner\Responder\IncidentsByDate.xslt"/>
8 </Properties>
9 <Inputs>
10 <Input Type="Miner.Responder.ArchiveExplorer.Filters.IncidentDateRangeInput,Miner.Responder.ArchiveExplorer"/>
11 </Inputs>
12 <Filters>
13 <Filter Type="Miner.Responder.ArchiveExplorer.Filters.IncidentDateRangeFilter,Miner.Responder.ArchiveExplorer"/>
14 <Filter Type="Miner.Responder.ArchiveExplorer.Filters.ClosedIncidentsFilter,Miner.Responder.ArchiveExplorer"/>
15 </Filters>
16 <Request Type="Miner.Responder.Shared.Requests.FindIncidentArchiveRequest,Miner.Responder.Shared"/>
17 <Transformations Key="">
18 <b:RuleClass Key="" Type="Miner.Responder.Processors.SubmitRules.Archive.IncidentArchiveDurationTransformation,Miner.Responder.Processors"/>
19 </Transformations>
20 <XMLExporter Type="Miner.Data.Configuration.XMLHierarchicalExporter,Miner.Data.Configuration"/>
21 <XMLTransformation Type="Miner.Data.Configuration.XMLTransformation,Miner.Data.Configuration"/>
22 </QueryClass>
|
-
The line numbers below correspond with the XML snippet above.
-
Line 1: Create a unique key for your report and enter a value for the Caption attribute. The Caption value is displayed on the Reports tab in Archive Explorer or in the Generate Reports tool in Responder Explorer. The Category value determines the output of the report, either Browser or Excel.
 |
Making changes to any Archive Explorer report that has a QueryClass Category="Browser" will modify that same report in Responder Web. |
-
Lines 4-7: Enter the properties required by the input control. In the example above, the Incidents by Date Range report prompts the user for a Minimum Outage Time and a Maximum Outage Time. The Description property provides the descriptive string that appears above the input controls. The XSLPath points to the style sheet that formats your report. You may have any number of properties, depending on the report.
Note: The XSLT files for the existing reports are installed here by default: C:\Documents and Settings\All Users\Application Data\Miner and Miner\Responder. You may create your own custom XSLT style sheet.
Figure 2, User input control for Incidents by Date Range query
- Line 10: The Input section points to the control in which the user enters the input data. If more than one input control is specified, the controls are stacked vertically in the dialog (see Figure 2). Available input controls reside in Miner.Data.Decoration. You may elect to create your own input control by implementing Miner.Data.Decoration.IUserInput.
- Lines 13-14: The Filter section uses the Properties to build a WHERE clause. When multiple properties are specified, they are connected using only AND statements (not OR). Data must meet all criteria to be included in the query. Available filters reside in the Miner.Responder.ArchiveExplorer.Filters namespace. You may also elect to create your own custom filter by deriving from Miner.Data.Decoration.FilterBase.
- Line 16: The Request section determines which request object is used. Request objects reside in the Miner.Responder.Shared.Requests namespace. You may also elect to create your own custom request object by deriving from RequestDataSetMixin and implementing IFilterDataRequest.
- Line 18: The Transformations section allows you to assign a transformation object that takes the retrieved dataset and modifies it. For example, the IncidentArchiveDurationTransformation class adds the duration value for each incident. If multiple transformations are specified, they are applied to the dataset one after another. Available transformation objects reside in the Miner.Responder.Processors.SubmitRules.Archive namespace. You may also elect to create your own custom transformation object. Custom transformation objects must derive from Miner.Data.Access.DataSetRule.
- Line 20: The XMLExporter object takes a transformed dataset and forms XML. In the example, the XMLHierarchicalExporter class formats the XML in a hierarchical fashion. This means that children of the incident (e.g., devices, location features, etc.) are displayed as children of the incident. If you wish to create a custom XMLExporter object, it must derive from Miner.Data.Configuration.XMLExporter.
- Line 21: The XMLTransformation object takes the exported XML and applies the XSLT style sheet designated in the Properties XSL Path and returns an HTML document. The XMLTransformation object resides in the Miner.Data.Configuration namespace. If you wish to create a custom XMLTransformation object, it must derive from Miner.Data.Configuration.XMLTransformation.