16.01.2015 Views

Adding Selectors to RescueNet Reports - ZOLL Data Systems

Adding Selectors to RescueNet Reports - ZOLL Data Systems

Adding Selectors to RescueNet Reports - ZOLL Data Systems

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

D o c u m e n t a t i o n<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

Revision:1.0<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

Document updated: April 25, 2011<br />

Table of Contents<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong> 1<br />

Overview 2<br />

Target audience 2<br />

What is a report selec<strong>to</strong>r 2<br />

What is an .IN2 file 3<br />

What you should know before adding report selec<strong>to</strong>rs 3<br />

Understanding .IN2 files 3<br />

Introduction 4<br />

The details of the .IN2 5<br />

The [Report] section 5<br />

The [Selec<strong>to</strong>rX] section 5<br />

Some simple examples 6<br />

Details on each entry 6<br />

The [SQL] section 8<br />

Details on each entry 8<br />

Details on each entry 9<br />

Examining sample .IN2 files 9<br />

TabletPCR 10<br />

Dispatch 12<br />

Billing 15


D o c u m e n t a t i o n<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

Revision:1.0<br />

Overview<br />

This document explains how <strong>to</strong> add selec<strong>to</strong>rs <strong>to</strong> reports in the <strong>RescueNet</strong> Reporting<br />

utility. Report selec<strong>to</strong>rs are set up using .IN2 configuration files that control the<br />

selec<strong>to</strong>rs (or filters) available <strong>to</strong> reports in the <strong>RescueNet</strong> Reporting utility.<br />

This section provides some background information on what you need <strong>to</strong> know before<br />

you consider adding report selec<strong>to</strong>rs in <strong>RescueNet</strong> Reporting.<br />

Target audience<br />

This document is intended for the reader that wants <strong>to</strong> further enhance or cus<strong>to</strong>mize<br />

the existing reports provided with <strong>ZOLL</strong>’s <strong>RescueNet</strong> Reporting utility.<br />

All the reports provided with the <strong>RescueNet</strong> Reporting utility have been developed<br />

using Crystal <strong>Reports</strong> XI.<br />

Before you read this document, you should have a good understanding of the<br />

<strong>RescueNet</strong> Reporting utility, Crystal <strong>Reports</strong> XI, and fundamental database concepts.<br />

What is a report selec<strong>to</strong>r<br />

Virtually every report provided in <strong>RescueNet</strong> Reporting has one or more selec<strong>to</strong>rs.<br />

A selec<strong>to</strong>r allows the person running a report <strong>to</strong> specify what portion of data in the<br />

database they would like <strong>to</strong> see. For example, if you wanted <strong>to</strong> run the Trip List report,<br />

you probably would not want <strong>to</strong> see all the trips in the entire database. You would want<br />

<strong>to</strong> select what trips should appear on the report, by trip date, for example. Therefore, a<br />

selec<strong>to</strong>r is really a report filter since it filters out which data should appear on a report.<br />

The reason you might want <strong>to</strong> add a report selec<strong>to</strong>r is that there is some method you<br />

would like <strong>to</strong> use for filtering out the data that you want, but it doesn’t currently exist<br />

in <strong>RescueNet</strong> Reporting.


D o c u m e n t a t i o n<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

Revision:1.0<br />

What is an .IN2 file<br />

Every report (.RPT) file provided in <strong>RescueNet</strong> Reporting has an associated .IN2 file.<br />

For example, the “Trip His<strong>to</strong>ry.RPT” file has an associated “Trip His<strong>to</strong>ry.IN2” file.<br />

The .IN2 file contains report selec<strong>to</strong>rs and also the report description, the data<br />

source/database <strong>to</strong> use, report sorting options and SQL statements. In order <strong>to</strong> add<br />

a selec<strong>to</strong>r <strong>to</strong> a report, you must modify the report’s associated .IN2 file.<br />

Modifying a report’s .IN2 file will accordingly change the report selec<strong>to</strong>rs,<br />

description and sort options that appear in the <strong>RescueNet</strong> Reporting utility.<br />

What you should know before adding report selec<strong>to</strong>rs<br />

Before attempting <strong>to</strong> add report selec<strong>to</strong>rs <strong>to</strong> your reports in <strong>RescueNet</strong> Reporting, there<br />

are a few things you should be aware of and steps you should follow:<br />

1. You should never modify the <strong>RescueNet</strong> Reporting original .RPT and/or .IN2 files<br />

provided by <strong>ZOLL</strong>! During a software upgrade or service pack, there is a chance<br />

that reports in <strong>RescueNet</strong> Reporting will be overwritten with newer versions.<br />

2. You are advised <strong>to</strong> use the cloning feature of <strong>RescueNet</strong> Reporting and perform<br />

your changes on the cloned report. All cloned reports are copied in<strong>to</strong> a “Cus<strong>to</strong>m”<br />

sub-folder of <strong>RescueNet</strong> Reporting.<br />

3. <strong>ZOLL</strong> software upgrades and service packs do NOT overwrite any reports that are<br />

located in the “Cus<strong>to</strong>m” folder and its sub-folders. Therefore, as long as your .RPT<br />

and .IN2 files are under the “Cus<strong>to</strong>m” folder, there is no chance of the files getting<br />

overwritten.<br />

4. A copy of the latest <strong>Data</strong> Dictionary is available in the secure section of <strong>ZOLL</strong>’s<br />

web site.<br />

5. When you are testing your cus<strong>to</strong>m .IN2 files, you can check the syntax of your<br />

selec<strong>to</strong>r filters in <strong>RescueNet</strong> Reporting by clicking the Selec<strong>to</strong>r Restriction tab and<br />

then the Formula tab after specifying some values in your selec<strong>to</strong>r list.<br />

Understanding .IN2 files


D o c u m e n t a t i o n<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

Revision:1.0<br />

This section provides some detailed information on what you’ll find inside an .IN2 file. It<br />

outlines the different sections of the .IN2 file and the options available <strong>to</strong> you for<br />

configuring each section.<br />

Introduction<br />

As you can see from the sample .IN2 file below there are essentially four different<br />

sections: Report, Selec<strong>to</strong>rX where X=1,2,3, …, SQL and Sort.<br />

The following section examines each entry individually.<br />

[Report]<br />

Version=Upgraded<br />

Timestamp=04/01/2003 09:50:28<br />

Name=Print Trip Details<br />

Description=Allows you <strong>to</strong> print the trip details report in batches.<br />

Selec<strong>to</strong>rCount=18<br />

[Selec<strong>to</strong>r1]<br />

Name=Company<br />

Selec<strong>to</strong>rType=SmallSelec<strong>to</strong>r<br />

DbTable=companies<br />

DisplayField=name<br />

ReportField=companies.name<br />

RestrictByField=name<br />

WhereClause=status > -1<br />

RestrictionWhereClause={companies.status} > -1<br />

[Selec<strong>to</strong>r2]<br />

Name=Trip Date<br />

Selec<strong>to</strong>rType=DateSelec<strong>to</strong>r<br />

ReportField=trips.tdate<br />

OutputFormat=Internal<br />

[SQL]<br />

SQLStatementCount=0<br />

[Sort]<br />

SortStringCount=0


D o c u m e n t a t i o n<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

Revision:1.0<br />

The details of the .IN2 file<br />

The following portion of the document examines each section of the .IN2 file and explains the<br />

meaning of each individual entry.<br />

The [Report] section<br />

The following section presents a detailed explanation of the [Report] section of the .IN2 file.<br />

This section MUST exist in the .IN2 file.<br />

[Report]<br />

Version=Upgraded<br />

Timestamp=04/01/2003 09:50:28<br />

Name=Print Trip Details<br />

Description=Allows you <strong>to</strong> print the trip details report in batches.<br />

Selec<strong>to</strong>rCount=18<br />

• Version – this should always be set <strong>to</strong> “Upgraded.”<br />

• Timestamp – although it is not necessary any longer, any time you make a change <strong>to</strong> an<br />

.IN2 file, you should update this entry.<br />

• Name – this is the name of the report as it appears in the <strong>RescueNet</strong> Reporting utility<br />

interface. If you have copied an existing report, you should change this value so you don’t<br />

end up with two reports with the same name.<br />

• Description – this is the description of the report as it appears in the <strong>RescueNet</strong> Reporting<br />

utility interface.<br />

• Selec<strong>to</strong>rCount – this tells the <strong>RescueNet</strong> Reporting utility how many selec<strong>to</strong>rs it should<br />

find below in the .IN2 file <strong>to</strong> display in the interface. If more [Selec<strong>to</strong>rX] sections are<br />

defined in the .IN2 file than this Selec<strong>to</strong>rCount, they are ignored. Therefore, if<br />

Selec<strong>to</strong>rCount=3 and a [Selec<strong>to</strong>r4] section exists, [Selec<strong>to</strong>r4] will be ignored.<br />

The [Selec<strong>to</strong>rX] section<br />

The following section presents a detailed explanation of the [Selec<strong>to</strong>rX] section of the<br />

.IN2 file. This is where you add report selec<strong>to</strong>rs <strong>to</strong> a report and is the most complicated<br />

part of the .IN2 file and requires the most knowledge of Crystal <strong>Reports</strong> and the <strong>ZOLL</strong><br />

database. This section is optional in the .IN2 file. If no [Selec<strong>to</strong>rX] sections exist, then no


D o c u m e n t a t i o n<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

Revision:1.0<br />

selec<strong>to</strong>rs are shown in the <strong>RescueNet</strong> Reporting interface. Usually, the only reports that<br />

don’t have selec<strong>to</strong>rs are the Administration reports for each product in <strong>RescueNet</strong><br />

Reporting.<br />

Some simple examples<br />

[Selec<strong>to</strong>r1]<br />

Name=Trip Date<br />

Selec<strong>to</strong>rType=DateSelec<strong>to</strong>r<br />

ReportField=fdc_trips.tdate<br />

OutputFormat=Internal<br />

[Selec<strong>to</strong>r2]<br />

Name=Company<br />

Selec<strong>to</strong>rType=SmallSelec<strong>to</strong>r<br />

DbTable=companies<br />

DisplayField=name<br />

ReportField=companies.name<br />

RestrictByField=name<br />

[Selec<strong>to</strong>r3]<br />

Name=Patient<br />

Selec<strong>to</strong>rType=LargeSelec<strong>to</strong>r<br />

DbTable=fdc_cus<strong>to</strong>mers<br />

DisplayField=lastname<br />

ReportField=fdc_trips.custno<br />

RestrictByField=custno<br />

AdditionalFields=firstname,ssn<br />

ColumnHeaders=Last Name,First Name,SSN<br />

Details on each entry<br />

• Name – this is the name of the report selec<strong>to</strong>r as it appears in the <strong>RescueNet</strong> Reporting<br />

utility interface.<br />

• Selec<strong>to</strong>rType – this is the type of report selec<strong>to</strong>r, of which there are several, as explained<br />

below:<br />

• DateSelec<strong>to</strong>r – use when the selec<strong>to</strong>r is a date field<br />

• DaySelec<strong>to</strong>r – use when the selec<strong>to</strong>r is a day of the week<br />

• TimeSelec<strong>to</strong>r – use when the selec<strong>to</strong>r is a time field<br />

• SmallSelec<strong>to</strong>r – use when the selec<strong>to</strong>r list is not <strong>to</strong>o large and/or only displays one<br />

column<br />

• LargeSelec<strong>to</strong>r – use when the selec<strong>to</strong>r list is large and the search feature is


D o c u m e n t a t i o n<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

Revision:1.0<br />

desired, and/or when more than one column is <strong>to</strong> be displayed<br />

• FormulaSelec<strong>to</strong>r – use when the selec<strong>to</strong>r sets a formula in the .rpt file based on a<br />

selection from a list of possible values. An example of this selec<strong>to</strong>r type can be<br />

found at: \\ServerName\CentralShare\<strong>Reports</strong>32\Field <strong>Data</strong>\Trip<br />

Related\Lists\TPCR Trip List.IN2<br />

• VehicleSelec<strong>to</strong>r – this selec<strong>to</strong>r is a special one, used only for filtering on<br />

vehicles. Identifying vehicles uses a two part primary key that required this<br />

cus<strong>to</strong>m selec<strong>to</strong>r.<br />

• ChooseOneSelec<strong>to</strong>r – this selec<strong>to</strong>r is a special one that should only be used by<br />

<strong>ZOLL</strong> report developers. It allows us <strong>to</strong> define cus<strong>to</strong>m choices in the database <strong>to</strong><br />

be presented <strong>to</strong> the user, and which Crystal statement will be added <strong>to</strong> the filter if<br />

it is chosen.<br />

• DbTable – this is the database table, s<strong>to</strong>red procedure or view where the list of selec<strong>to</strong>r<br />

descriptions and the associated filter value <strong>to</strong> be passed in<strong>to</strong> the report are obtained.<br />

• DisplayField – this is the column/field(s) in DbTable that contains the selec<strong>to</strong>r<br />

descriptions <strong>to</strong> be shown in the selec<strong>to</strong>r list.<br />

• AdditionalFields – for the selec<strong>to</strong>r type LargeSelec<strong>to</strong>r only, this allows you <strong>to</strong><br />

specify a list of additional fields <strong>to</strong> display in the selec<strong>to</strong>r list. For example, when<br />

displaying a list of facilities, you might also want <strong>to</strong> include the street address and city.<br />

An example of this selec<strong>to</strong>r type can be found at:<br />

\\ServerName\CentralShare\<strong>Reports</strong>32\ \Field <strong>Data</strong>\Trip Related\Lists\TPCR Trip<br />

List.IN2<br />

• ColumnHeaders – usually when using the AdditionalFields entry, you also want <strong>to</strong><br />

specify the column headers that appear in the selec<strong>to</strong>r list for each field.<br />

• WhereClause – this allows you <strong>to</strong> filter out records (values) that are retrieved from the<br />

database table DbTable and displayed in the selec<strong>to</strong>r list. For example, you might want<br />

<strong>to</strong> only display records from DbTable that have not been disabled/deactivated in<br />

Administration. If you are familiar with SQL queries, this works exactly the same as<br />

the Where clause in a query.<br />

• ReportField – this is the name of the database table and field in the Crystal report file<br />

that the selec<strong>to</strong>r/filter will be applied against. For example, if filtering on a trip date<br />

range, this entry would be the name of the field in the trips table - “trips.tdate”.<br />

• RestrictByField – this is the database field in DbTable that contains the value(s) <strong>to</strong> be<br />

applied against the ReportField, based on the values selected in the displayed selec<strong>to</strong>r<br />

list.<br />

• RestrictionWhereClause – this allows you <strong>to</strong> filter out records that are retrieved from<br />

the database table in ReportField when the report is run. This filter restriction will be<br />

applied <strong>to</strong> the report in addition <strong>to</strong> the values selected in the selec<strong>to</strong>r list. For example,<br />

you might want <strong>to</strong> only select records from the table in ReportField that have not been<br />

disabled/deactivated in Administration.<br />

• OutputFormat – there are several possible formats for certain types of database fields,


D o c u m e n t a t i o n<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

Revision:1.0<br />

they are as follows:<br />

• DateFunction – when the date/time field in the database is of the date/time field type.<br />

• Internal – when the date/time field in the database is in character format YYYY-MM-<br />

DD.<br />

• Crystal – when the date/time field in the database is in character format MM/DD/YY.<br />

• FormulaToSet – this is the name of the formula in the associated Crystal report file<br />

that will be set based on the several methods of allowing a user <strong>to</strong> specify a single<br />

value for the selec<strong>to</strong>r types FormulaTextSelec<strong>to</strong>r and FormulaSelec<strong>to</strong>r. An example<br />

of this selec<strong>to</strong>r type can be found at: \\ServerName\CentralShare\<strong>Reports</strong>32\Field<br />

<strong>Data</strong>\Trip Related\Lists\TPCR Trip List.IN2<br />

• FormulaType – this is the type of Formula selec<strong>to</strong>r, they are as follows:<br />

• Number – if the formula being set in the Crystal report file expects a number<br />

• Text – if the formula being set in the Crystal report file is string/text<br />

• ValueField – this is essentially the same as the RestrictByField entry. It is the database<br />

field in the DbTable that contains the value <strong>to</strong> be applied against the FormulaToSet<br />

formula, based on the value selected in the displayed formula selec<strong>to</strong>r list. It is not<br />

used with the selec<strong>to</strong>r type FormulaTextSelec<strong>to</strong>r.<br />

• FormulaDisplayX – this is the list of values that are displayed in the formula selec<strong>to</strong>r<br />

list. Each FormulaDisplayX entry requires a matching FormulaValueX entry.<br />

• FormulaValueX – this is the associated value for the selected FormulaDisplayX item that<br />

is chosen in the selec<strong>to</strong>r list <strong>to</strong> be applied against the FormulaToSet entry.<br />

• DefaultItemNumber – when using the FormulaDisplayX and FormulaValueX<br />

entries, this is the default item that is highlighted in the selec<strong>to</strong>r list when it is first<br />

displayed in <strong>RescueNet</strong> Reporting.<br />

The [SQL] section<br />

The following section presents an explanation of the [SQL] section of the .IN2 file. This section<br />

of the .IN2 file is a carryover from older versions of <strong>RescueNet</strong> Reporting and we advise<br />

against using it. This section is made obsolete by the use of database Views.<br />

This section is optional in the .IN2 file.<br />

[SQL]<br />

SQLStatement1=MakeReportingChargeCompanies<br />

SQLStatementCount=1<br />

Details on each entry<br />

• SQLStatementX – if included in the .IN2 here, a temporary table is generated by<br />

<strong>RescueNet</strong> Reporting and is used by the associated Crystal report file. Only <strong>ZOLL</strong> report


D o c u m e n t a t i o n<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

developers should use it.<br />

• SQLStatementCount – this tells the <strong>RescueNet</strong> Reporting utility now many SQL<br />

statements it should find in the .IN2 file.<br />

Revision:1.0<br />

The [Sort] section<br />

Use this section <strong>to</strong> add sort options <strong>to</strong> a report. This section is optional in the .IN2 file. If no<br />

[Sort] section exists or the SortStringCount=0, then no sort options are shown in the<br />

<strong>RescueNet</strong> Reporting interface. Only one of the sort string options present in the .IN2 file can<br />

be specified at any given time in <strong>RescueNet</strong> Reporting.<br />

[Sort]<br />

SortString1=Cus<strong>to</strong>mer Name,+{Cus<strong>to</strong>mers.Name}<br />

SortString2=Date/Trip Number,+{Trips.tdate},+{Trips.job}<br />

SortString3=Date/Pick-Up Time,+{Trips.tdate},+{Trips.puptime}<br />

SortString4=Ordering Facility,+{OFacilities.name}<br />

SortStringCount=4<br />

Details on each entry<br />

• SortStringX – if included in the .IN2 here, a Sort option is displayed <strong>to</strong> the user in<br />

<strong>RescueNet</strong> Reporting and includes both the description (the first portion before the<br />

comma) and the actual fields in the sort string that will be applied <strong>to</strong> the Crystal report<br />

file (after the comma). When a sort string is selected in <strong>RescueNet</strong> Reporting, it overrides<br />

the default sort order in the Crystal report file and applies the one selected. A “+” symbol<br />

indicates sorting in ascending order by the field specified. A “-“ symbol indicates sorting<br />

in descending order by the field specified.<br />

• SortStringCount – this tells the <strong>RescueNet</strong> Reporting utility now many sort strings it<br />

should find in the .IN2 file <strong>to</strong> display in the interface.<br />

Examining sample .IN2 files<br />

This section provides examples of existing .IN2 files from several different reports in<br />

<strong>RescueNet</strong> Reporting. They are meant <strong>to</strong> illustrate how <strong>to</strong> use the different entries described in<br />

the previous section. Each example will contain one or perhaps two sections from the .IN2 file<br />

chosen for the illustration.


D o c u m e n t a t i o n<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

Revision:1.0<br />

ePCR (Field <strong>Data</strong>)<br />

Sample #1 (Intervention Outcomes Summary.IN2)<br />

[Selec<strong>to</strong>r3]<br />

Name=Intervention Qualifier<br />

Selec<strong>to</strong>rType=LargeSelec<strong>to</strong>r<br />

DbTable=v_interventionqualifiers<br />

DisplayField=interventionqualifier<br />

ReportField=intervention_qualifiers.code<br />

RestrictByField=qualifier_id<br />

ColumnHeaders=Intervention Qualifier<br />

The [Selec<strong>to</strong>r3] sample above illustrates the LargeSelec<strong>to</strong>r. The DbTable<br />

“v_interventionqualifiers” is actually using a view built in<strong>to</strong> the database as opposed <strong>to</strong> an<br />

actual database table. This view is built by <strong>ZOLL</strong> in the database and it basically combines<br />

information from several tables in<strong>to</strong> one “view”.<br />

The DisplayField is going <strong>to</strong> pull up the name of the Qualifier from the “interventionqualifier”<br />

field from inside of the “v_interventionqualifiers” view and show it in the dialog box in<br />

<strong>RescueNet</strong> Reporting. This will allow the user <strong>to</strong> pick the qualifier they wish <strong>to</strong> report on.<br />

Also notice the ColumnHeaders entry. This value (Intervention Qualifier) will be displayed<br />

inside the selec<strong>to</strong>r dialog box.<br />

[Selec<strong>to</strong>r4]<br />

Name=Chart Preference<br />

Selec<strong>to</strong>rType=FormulaSelec<strong>to</strong>r<br />

FormulaDisplay1=Pie Chart<br />

FormulaDisplay2=No Chart<br />

FormulaValue1=Pie Only<br />

FormulaValue2=No Chart<br />

DefaultItemNumber=1<br />

FormulaToSet=@charttype selection value<br />

FormulaType=Text<br />

The [Selec<strong>to</strong>r4] provides a sample of using the FormulaSelec<strong>to</strong>r entry <strong>to</strong> tell Crystal whether or<br />

not <strong>to</strong> display a Pie Chart in the report. It makes use of the FormulaToSet entry <strong>to</strong> send Crystal<br />

the information in a Text format as dictated by the FormulaType entry.<br />

Sample #2 (Assessments.IN2)


D o c u m e n t a t i o n<br />

[Selec<strong>to</strong>r1]<br />

Name=Assessment<br />

Selec<strong>to</strong>rType=SmallSelec<strong>to</strong>r<br />

DbTable=Assessment_categories<br />

DisplayField=descr<br />

ReportField=assessment_categories.code<br />

RestrictByField=code<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

Revision:1.0<br />

[Selec<strong>to</strong>r1] allow the user <strong>to</strong> tell Crystal <strong>Reports</strong> <strong>to</strong> restrict the report <strong>to</strong> only the “Categories”<br />

chosen in the selec<strong>to</strong>r. The RestrictByField sends those values (code) over <strong>to</strong> Crystal for use<br />

in the selection formula inside of the report.<br />

[Selec<strong>to</strong>r2]<br />

Name=Active Status<br />

Selec<strong>to</strong>rType=FormulaSelec<strong>to</strong>r<br />

FormulaDisplay1=Active<br />

FormulaDisplay2=Inactive<br />

FormulaDisplay3=No Restriction<br />

FormulaValue1=1<br />

FormulaValue2=2<br />

FormulaValue3=3<br />

DefaultItemNumber=3<br />

FormulaToSet=@StatusSelec<strong>to</strong>rValue<br />

FormulaType=Text<br />

In [Selec<strong>to</strong>r2] the user is allowed <strong>to</strong> define the scope of the report based upon if fields are<br />

active or not. By using the FormulaSelec<strong>to</strong>r type different string values are displayed <strong>to</strong> the<br />

user and those string values are associated with numeric values that the Crystal Report will<br />

understand. This number is sent <strong>to</strong> the report and dropped in<strong>to</strong> a formula called<br />

“@StatusSelec<strong>to</strong>rValue” based upon the FormulaToSet entry.<br />

Sample #3 (Average Age by Primary Impression/Call Type.IN2)<br />

[Selec<strong>to</strong>r8]<br />

Name=Status<br />

Selec<strong>to</strong>rType=SmallSelec<strong>to</strong>r<br />

DbTable=descriptions<br />

DisplayField=descr<br />

ReportField=Trips.Status


D o c u m e n t a t i o n<br />

RestrictByField=code<br />

WhereClause=dtype=11<br />

RestrictionWhereClause=<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

Revision:1.0<br />

[Selec<strong>to</strong>r8] makes use of a table (descriptions) that s<strong>to</strong>res values for a variety of fields in<br />

ePCR. The data that we’re looking for in this report is the “Status” of the trip. In the<br />

descriptions table all of the statuses are identified by a dtype (description type) of 11. With<br />

this in mind, we use the WhereClause entry and set the dtype <strong>to</strong> 11. This instructs the selec<strong>to</strong>r<br />

dialog box <strong>to</strong> only show the statuses for the end user <strong>to</strong> select. Once the end user makes their<br />

selections and runs the report the RestrictByField sends over all of the appropriate code values<br />

<strong>to</strong> the Crystal Report.<br />

[Selec<strong>to</strong>r10]<br />

Name=Pick-up time<br />

Selec<strong>to</strong>rType=TimeSelec<strong>to</strong>r<br />

ReportField=Trips.putime<br />

The reason that [Selec<strong>to</strong>r10] is so simple (three entries) is because it doesn’t need <strong>to</strong> pull any<br />

information out of the database <strong>to</strong> display the selec<strong>to</strong>r dialog box <strong>to</strong> the end user. The<br />

TimeSelec<strong>to</strong>r simply displays a control that allows the end user <strong>to</strong> pick specific times and then<br />

the ReportField entry sends that information <strong>to</strong> Crystal where the restriction is executed<br />

against the Trips.putime field.<br />

Dispatch<br />

Sample #1 (\Dispatch\Performance\Response times\AVRSPDRV.IN2)<br />

[Selec<strong>to</strong>r1]<br />

Name=Company<br />

Selec<strong>to</strong>rType=SmallSelec<strong>to</strong>r<br />

DbTable=companies<br />

DisplayField=name<br />

ReportField=companies.name<br />

RestrictByField=name<br />

WhereClause=status > -1<br />

RestrictionWhereClause={companies.status} > -1The [Selec<strong>to</strong>r1] sample above illustrates the<br />

SmallSelec<strong>to</strong>r with some restrictions. The DbTable “companies” contains a list of companies<br />

that include a name, status and code.<br />

You will notice that a WhereClause has been specified that filters the selec<strong>to</strong>r list that is<br />

displayed. The selec<strong>to</strong>r list that is displayed in <strong>RescueNet</strong> Reporting will contain a list of


D o c u m e n t a t i o n<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

Revision:1.0<br />

company names, as specified in the DisplayField entry, that have a “status>-1”, as specified in<br />

the WhereClause. In this example, a disabled/inactive company would have a status = -1 and<br />

would not be seen in the selec<strong>to</strong>r list. When a user selects one or more company names, the<br />

associated RestrictByField (companies.name) filter will be applied, along with the<br />

RestrictionWhereClause, <strong>to</strong> the ReportField (companies.name). The resulting filter might look<br />

like the following: ({companies.name}=“EMS Provider Agency” OR<br />

{companies.name}=”Ambulance Agency”) AND {Companies.status} > -1<br />

[Selec<strong>to</strong>r2]<br />

Name=Trip Date<br />

Selec<strong>to</strong>rType=DateSelec<strong>to</strong>r<br />

ReportField=Trips.tdate<br />

OutputFormat=Internal<br />

The [Selec<strong>to</strong>r2] sample above illustrates that the ReportField “Trips.tdate” in the RCSQL<br />

database uses the Internal OutputFormat. The Internal format signifies that the Trips.tdate<br />

field is not a native date/time stamp field but instead is a character field. The resulting filter<br />

might look like the following: “({Trips.tdate} >= '2002-02-24' AND {Trips.tdate} = '08:00' AND<br />

Trips.putime}


D o c u m e n t a t i o n<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

Revision:1.0<br />

Selec<strong>to</strong>rType=LargeSelec<strong>to</strong>r<br />

DbTable=facilities<br />

DisplayField=name<br />

ReportField=facilities.name<br />

RestrictByField=name<br />

WhereClause=fstatus > -1<br />

RestrictionWhereClause={Facilities.fstatus} > -1<br />

AdditionalFields=faddr,fcity<br />

ColumnHeaders=Name,Address,City<br />

The [Selec<strong>to</strong>r5] sample above illustrates the LargeSelec<strong>to</strong>r with multiple columns with<br />

where clauses specified. The DbTable “facilities” contains a list of facility names, address<br />

info, codes and statuses. The selec<strong>to</strong>r list that is displayed in <strong>RescueNet</strong> Reporting will<br />

contain 3 columns: the facility name, address and city that are specified in the DisplayField<br />

and AdditionalFields entries.<br />

Also, only those facilities with a “fstatus>-1” value will be displayed in the selec<strong>to</strong>r list, as<br />

specified in the WhereClause. In this example, a disabled/inactive facility would have a status<br />

= -1 and would not be seen in the selec<strong>to</strong>r list. The column headings for the selec<strong>to</strong>r list will<br />

be as specified in the ColumnHeaders entry. When a user selects one or more facilities, the<br />

associated RestrictByField (facilities.name) filter, along with the RestrictionWhereClause,<br />

will be applied <strong>to</strong> the ReportField (facilities.name). The resulting filter might look like the<br />

following: ({facilities.name}=“Main Memorial” OR {facilities.name}=”Maple General<br />

Hospital”) AND {Facilities.fstatus} > -1<br />

[Selec<strong>to</strong>r11]<br />

Name=Vehicles<br />

Selec<strong>to</strong>rType=VehicleSelec<strong>to</strong>r<br />

ReportField=companies.name, trips.veh<br />

OutputFormat=Name<br />

The [Selec<strong>to</strong>r13] sample above illustrates the VehicleSelec<strong>to</strong>r using a Crystal <strong>Data</strong> Dictionary<br />

for the definition of the database fields. This selec<strong>to</strong>r is a special one, used only for filtering on<br />

vehicles within Dispatch in the RCSQL database. It displays a list of Companies and the<br />

vehicles for each company. Since the OutputFormat=Name then the company portion of this<br />

selec<strong>to</strong>r is <strong>to</strong> create a filter for the selected company as a string. The resulting filter might look<br />

like the following: (({companies.name} = "My Company" AND {trips.veh} = "V101") OR<br />

({companies.name} = "My Company" AND {trips.veh} = "V100"))<br />

Sample #3 (\General\Trip related\Lists\DRVBOOK.IN2)<br />

[Selec<strong>to</strong>r12]


D o c u m e n t a t i o n<br />

Name=Vehicles<br />

Selec<strong>to</strong>rType=VehicleSelec<strong>to</strong>r<br />

ReportField=Trips.Cmpy,Trips.Veh<br />

OutputFormat=code<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

Revision:1.0<br />

The [Selec<strong>to</strong>r12] sample above illustrates the VehicleSelec<strong>to</strong>r with the code OutputFormat.<br />

This selec<strong>to</strong>r is a special one, used only for filtering on vehicles within Dispatch in the<br />

RCSQL database. It displays a list of Companies and the vehicles for each company. Since<br />

the OutputFormat=Code then the company portion of this selec<strong>to</strong>r is <strong>to</strong> create a filter for the<br />

selected company as a code. The resulting filter might look like the following:<br />

(({Trips.Cmpy} = 2 AND {Trips.veh} = “V101”) OR ({Trips.Cmpy} = 2 AND {Trips.veh} =<br />

“V100”))<br />

Billing<br />

Sample #1 (\Billing\Accounts Receivable\Receivables Summary by<br />

Month.IN2)<br />

[Selec<strong>to</strong>r6]<br />

Name=Pick-Up Facility<br />

Selec<strong>to</strong>rType=LargeSelec<strong>to</strong>r<br />

DbTable=facilities<br />

DisplayField=name<br />

ReportField=singlefac_prio_zone_view.pufacname<br />

RestrictByField=name<br />

WhereClause=fstatus > -1<br />

RestrictionWhereClause={singlefac_prio_zone_view.pufacstatus} > -1<br />

AdditionalFields=faddr,fcity<br />

ColumnHeaders=Name,Address,City<br />

The [Selec<strong>to</strong>r6] sample above illustrates the LargeSelec<strong>to</strong>r with multiple columns with where<br />

clauses specified and a ReportField based on a database view. The DbTable “facilities”<br />

contains a list of facility names, address info, codes and statuses. The selec<strong>to</strong>r list that is<br />

displayed in <strong>RescueNet</strong> Reporting will contain 3 columns: the facility name, address and city<br />

that are specified in the DisplayField and AdditionalFields entries.<br />

Also, only those facilities with a “fstatus>-1” value will be displayed in the selec<strong>to</strong>r list, as<br />

specified in the WhereClause. In this example, a disabled/inactive facility would have a status<br />

= -1 and would not be seen in the selec<strong>to</strong>r list. The column headings for the selec<strong>to</strong>r list will<br />

be as specified in the ColumnHeaders entry. When a user selects one or more facilities, the<br />

associated RestrictByField (facilities.name) filter, along with the RestrictionWhereClause,<br />

will be applied <strong>to</strong> the ReportField (singlefac_prio_zone_view.pufacname). The resulting filter


D o c u m e n t a t i o n<br />

<strong>Adding</strong> <strong>Selec<strong>to</strong>rs</strong> <strong>to</strong> <strong>RescueNet</strong> <strong>Reports</strong><br />

Guidelines for Editing .IN2 Files<br />

might look like the following: ({singlefac_prio_zone_view.pufacname}=”ABC Medical<br />

Center” OR {singlefac_prio_zone_view.pufacname}=”Acme Dialysis Center”) AND<br />

{singlefac_prio_zone_view.pufacstatus} > -1<br />

Revision:1.0<br />

Sample #2 (\Billing\Charges\Charge Detail Trip Date.IN2)<br />

[Selec<strong>to</strong>r4]<br />

Name=Show reversing charges<br />

Selec<strong>to</strong>rType=ChooseOneSelec<strong>to</strong>r<br />

QuestionSet=1<br />

DisplayField=Choose whether or not <strong>to</strong> show reversed charges. If using a period selec<strong>to</strong>r,<br />

it is recommended that you include reversed charges.<br />

RestrictByField=2*<br />

The [Selec<strong>to</strong>r4] sample above illustrates the ChooseOneSelec<strong>to</strong>r. This selec<strong>to</strong>r is a special one<br />

that is normally only used by <strong>ZOLL</strong> report developers. It allows us <strong>to</strong> define cus<strong>to</strong>m choices in<br />

the database <strong>to</strong> be presented <strong>to</strong> the user, and which Crystal statement will be added <strong>to</strong> the filter if<br />

it is chosen. The QuestionSet=1 defines the question set in the ChooseOneSelec<strong>to</strong>rQandA<br />

database table that is displayed in the selec<strong>to</strong>r list <strong>to</strong> the user. The resulting filter might look like<br />

the following: ({trip_addons.printable} = 1) The RestrictByField For example we might have<br />

choices “Currently in collections” and “Currently not in collections” that translate <strong>to</strong> filter<br />

statements “trips.in_collections=True” and “trips.in_collections=False”. The resulting filter<br />

might look like the following: {trip_addons.printable} = 1<br />

* The RestrictByField in this selec<strong>to</strong>r has no effect on the selec<strong>to</strong>r itself or the filter passed <strong>to</strong> the<br />

Crystal Report.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!