logo


54.1.8 Detail Report: Input Form: Fields Selected


 

Detail Report: Input Form: Fields selected

There are several distinct areas on this page:

Documents - General or Documents - Date Time

This area allows you to specify the documents that will be used as containers for the exported data. You can specify many documents. Each document will be evaluated separately and the result sent to a separate document on disk. This is useful when you want to create several similar documents that use the same Master Query for instance:

Detail Report: Input Form: Fields: Documents for General or Date Time Stamp Query area

Item

Function

“+” and “-” buttons

The order of documents can be changed using the + and - buttons to the right of the document list.

Delete All

Delete all the documents and their specifications

Delete One

Delete the selected document and its specification.

Duplicate

Duplicate the selected document and its specification.

Add

Add a new document to the list. The default name is ‘Export Document’. This name can be edited in the edit field below the Document List. Once a document has been created you can assign fields to it.

Edit area

Click on a Document in the Document list to edit it in the edit area below the list.

Available Fields and Fields selected for document areas

This area contains a two part drop down list that gives you access to Tables and Fields available for export and displays the Fields already selected:

Detail Report: Input Form: Fields: Available Fields area

Item

Function

Field

The first drop down list is a list of available Tables. Clicking on a Table name displays the Fields for this table in the second drop down list.

You can then select the field you require form the second drop down list.

Field Type display

Next to the ‘A’ and ‘Z” button is a text label that displays the type of field currently selected.

“A” & “Z” buttons

Sort the field list into ascending or descending alphabetical order.

Field Description

This will contain a description of the function of the field.

Add One

Add the currently selected field to the currently selected document.

Add All

Add all the fields for the currently selected Table to the currently selected document.

Remove One

Remove the currently selected field from the currently selected document.

Remove All

Remove all the fields from the currently selected document.

Selected Fields

Displays all the Fields selected for the currently selected document. The Table and Field Names are displayed. For Data Driven Tables the Helper is also displayed in order to identify the item selected.

“+” and “-” buttons

The order of fields can be changed using the + and - buttons to the right of the Fields in selected document list. Select a field move it up or down the list.

Count of Fields

The number of fields selected for the currently selected document.

Mixing Fields in the same document

This area is essentially the same for both DT Stamp exports and Master exports with ONE IMPORTANT exception. In a General Query Export you can mix fields from different Tables in the same document. This is not allowed for Date Time Stamp exports. You will be warned if you try to do this.

The Date Time Stamp Export facility within STATIC exists to allow for the export of changed records. To do this we need to find all the changed records for every table and then export the contents of these changed records. Mixing the contents of these records by defining fields from different Tables within the same document does not make sense within this context.

Document Slave Query for General Query

Except for Place Holders, this area behaves in a very similar manner to the Query area as described in the Chapter “Reports: Query Store” on page 427.

For details on setting Placeholders see the Place Holder Section on page 349

Important

Every Document MUST have a Slave Query defined for it. Within this Slave Query there MUST BE at least one USE SET command. The table of the last USE SET command in the Slave Query also determines the Master Table for the document

If you do not define a USE SET command, then there will be no Master Table and no Current Selection of Records (for that Master Table) that the export can use to generate the contents of the specified Documents and you will end up with an empty document.

You are warned if a USE SET command has not been defined.

The Slave Query is evaluated only once for each Document.

Document Slave Query for Date Time Stamp Order By

This area is in fact a Query area with most of the Query commands made invisible. This means it functions like a regular Query area in all other aspects.

For a Date Time Stamp Query, the only other action that would make sense to perform on a selection of records would be to sort them into a particular order. This area allows you to do this. See “Query Store: Command: Order By” on page 443 and “Query Store: Command: Order by Formula” on page 443 for more details.

Note: If you import Queries into this area and they contain Query commands, you will get unexpected results as the imported Query could change the selection of records to something other than those created through the Date Time Stamp fields in the Master Query area.

Master Table for Document

As there can be a mixture of Fields selected for a document that is generated by a Master Query, you must tell the Report what you consider to be the Master Table for the current Document. This is automatically done by the USE SET command. Whatever is the table for the last USE SET command used in the Slave Query also determines the Master Table for the document.

The Master Table will determine how the exported data is treated when a relation exists to the selected Master Table.

For instance, if a field from a Table is selected that has no relation to the Master Table selected, then no data is exported for that field and you will be warned in the resulting output by an error message.

If a field from a table is selected that has a Many relation to the Master Table selected, then there may be 2 or more records that could be used to fill the field - STATIC has to make a choice - it may not be the choice you expect or want.

As an example, say the Master Table is set to [HospitalRecord] and you are exporting 2 fields - [HospitalRecord]Demog_Last_Name and [ICURecord]Adm_Date. For each [HospitalRecord] record, STATIC would now export the Last_Name but when it comes to the [ICURecord]Adm_Date, and there happen to be 2 records, which Admission date does it use? There is clearly a choice because there is more than one record! STATIC (unlike many other database systems that would just report an error at this stage) will in this case use the first record it comes across to fill the field.

It may of course be better to export this data using the [ICURecord] table as the Master table - in this case you would have more rows in your output compared to using the [HospitalRecord] Master Table as there will be a row for every [IUCRecord] record. This is because there are always more [ICURecord] records in a given selection than [HospitalRecord] records because there can be more than one ICU Admission per Hospital Admission.

Note: Make sure you have a Current Selection of records to work with for the selected Master Table for Document. Do this by executing the Slave Query and ensuring there is a selection of records returned for the Query as displayed in the Query display area. This is a god habit to ensure there is something available that can be worked with to create output!

Document Headers

This controls the Headers for a Document.

Sometimes you will want to create documents without any Headers at all - for instance when exporting a Document that will be used as the import source for another database. In this case you would certainly not want a Header at the top of the document - it would spoil the import of the document and would have to be stripped out before import.

Usually you will want to export the document with a Header in order to identify the document.

Document Headers:

Detail Report: Input Form: Fields Selected: Document Headers

Item

Function

Export Headers? checkbox

If this is selected then the exported document will have headers exported before the actual data. The Headers include the Name of the Document, the Date Time stamp and the names of the individual fields for each column.

Table Name in Column Header? checkbox

If this is checked then the full field name is exported as the column header other wise the short field name is used.

The full field name is of the form [ICURecord]Adm_Date.

The short name for the same field is of the form Adm_Date.

Title of Document in Header

This is a Title that can be displayed at the top of the document. This title can include placeholders. Placeholders in this area are of the Text type. See “Detail Report: Input Form: Place Holders page” on page 359 for more.

Place Holder Button

This inserts a placeholder at the current insertion point in Title of Document in Header.



Harrowex Pty Ltd
http://www.hxmedical.com
Voice:+ 61 4 27 344 279
Fax: +61 3 52 439 019
static@hxmedical.com