Syntax for Text, Graph, Screen and Import definition files

Reports can be text or graph, or screen, and data can be imported.

The definition files needs to be edited with Notepad, or some other text editor - use ProbeMenu/SystemOptions report tab

Note: Probe for Windows v2 has an editor for RPT and IPT definitions. (GPT in progress)

Text reports (RPT)

Reports can be printed to paper, or exported as comma-delimited files.

Reports to paper have different sections - report header, page header, details, etc

Each line in the RPT file specifies an item, and in which section it will print. Only items in the detail (each site) section will be exported. An item can be...

In addition, a column can be specified.

A column will be printed in 2 parts...

The column titles can be printed either...

Each item that is to be printed has a specification line with format...

SectionCode~TypeCode~Source~Left~Top~Right~Bottom~Font~Size~Bold~Format~Align~Units~Colour

Section Codes

Section codes specify in which section of the report the item is to be printed.

SectionCodeSection
RHReport header - printed once at beginning of report
RFReport footer - printed once at end of report
PHPage header - printed at top of each page
PFPage footer - printed at bottom of each page
GH1Group header 1 - printed before a group break
GF2Group footer 2 - printed after a Group break
DDetail printed for each site
CnColumn, to go in both detail and column headers.
CHColumn header - printed either at top of page or after group header.

Type Codes

Type codes specify the type of data that is to be output.

TypeCodeDescription
SECTIONHEIGHTHeight of section in cm
TEXTText box e.g. Source = NAME will print Top Paddock
LABEL Label displaying fixed text e.g. Site Report but can include variables...
e.g. Source = \OWNER1
displays the first line in the Owner registration file.
FORMULAText box will display numeric data or formula
e.g. Source = FULL or COTTON.DWU*1.2
INDIRECTFORMULAValue of a formula
e.g. Source = LOWER will evaluate the LOWER formula
LINEDraws a line from Left, Top to Right, Bottom
size = line width in points (0 = hairline)

Source or Formulas

The source specifies where the data is coming from. It can be the name of a field in the database, or a formula. See Formulas and Variables


Position

For example...

RIGHT=8 is a point 8 cm from the left margin. If the left margin = 2.5 cm, it will print at 10.5 cm from left edge of paper.

TOP=1.2 is a point 1.2 cm below the top of the current section.

Size, units, format, font

If a font or font size is not specified, the report default font is used.

Units and format are only applicable for numeric formulas.

Line sizes are specified in points. (1 pt = 1/1440 inches; 0 = hairline, the thinnest line possible on the printer).


Colour Codes

Colours are specified with a colour code (e.g. RED)

RED
GREEN
BLUE
YELLOW
MAGENTA
CYAN
&FF00FFhexadecimal (preceded by an &) - same as HTML.

Examples of Report/Export Specifications


Specification line in RPT fileResult
PH,SECTIONHEIGHT,1.3
  • Height of page header = 1.3 cm
PH,LABEL,Sites Report for \OWNER1,0,0,15.8,0.5, Arial, 16 , 1 ,,L, 0, RED
  • prints in the page header
  • Sites Report for Lebombo Farms
  • left aligned in a rectangle from 0 to 15.8cm, 0 to 0.5 cm high
  • Font = Arial, 16 pt; bold; in red
PH,LABEL,Where: \WHERE,11,0.7,16,1.2, Arial, 12 , 1 ,,R, 0
  • prints in the page header
  • Where: EPIAMT<10
  • right aligned, in a space from 0 - 5 cm wide, 0 - 0.7 cm high.
  • Font = Arial, 12 pt, bold
GH1,LINE,,0,1.2,16,1.2,, 2 , 0 ,,L, 0
  • In the first group header.
  • Draws a horizontal line from 0 to 16 cm, 1.2 cm below top of section.
GF1,FORMULA,COTTON.DWU,0,0,5,0.5,Arial,10,DWU,0,L,1
  • prints in the first group footer
  • 3.6 mm/day
  • (the value today of DWU from the file COTTON.DWU)
  • left aligned in a rectangle from 0 - 5cm, 0 - 0.5 cm high
  • Font = Arial, 10 pt; DWU format; not bold; with units (mm/day)
CH,SECTIONHEIGHT,2
  • Column header section to be 2 cm high.
CH,LINE,0,2,18,2,1
  • In the column header section
  • Draws a line at the bottom of the section, 18 cm wide, 1 pt thick

The column header section height should be specified - this section can also have lines drawn like any of the other sections.


Column Specifications

Each column to be output needs a column specification, with the type code Cn, with format...

ColNum,Source,Width,Format,Units,Align,Title,TypeCode 'comments

Each column will be printed in to two parts, the title going to a LABEL (in either the page header or group header) and the source to a FORMULA in the detail section. The horizontal position of the items will be calculated based on the column width.

The actual output will be suppressed if width=0. This can be used to calculate intermediate results.

The character | will force a new line in a column title.

ItemNotes
ColNumCn n = column number
SourceAny reserved word (variables) or formula.
WidthWidth of output, in cm.
Formatsee Format Codes
AlignAlignment. L= left; C = centred; R = right.
Units1 = display units (eg mm/day) 0= no units
TitleThe title at the top of a column - use | for multiple lines.
TypeCodeFormula or IndirectFormula

Examples of Column Specifications


Line in RPT filePrinted Result
C3,NAME,0.8,T,R,0,Site|Name
       Site
       Name
-----------
Top Paddock
    Site 33
C4,PDWU,0.6,DWU,R,1,Probe|Dwu|\UDWU
       Probe
         Dwu
      mm/day
-------------
  2.3 mm/day
  1.1 mm/day
C5,EPIAMT*AREA*FACTOR4,0.8,VOL,R,1,Amount
      Amount
------------
       12 Ml

EPIAMT - data field that contains the calculated amount or water required if scheduling is based on estimated daily water use
AREA - is the site area
10 - is to convert from area*depth to volume
FACTOR4 - is in the lookup table - will be specific for each valve.
The output will be in the volume units (VOL) as selected by the user with ProbeMenu/DisplayUnits.


Graph report definitions (GPT)

To customise graph reports use ProbeMenu/SystemOptions and edit the file GITEMS.TXT or GPT file.

Prior to version 1.0.204... After version 1.0.204... Prwin v2
Report names in file GNAMES.TXT. File GNAMES.TXT is not used File GNAMES.TXT is not used
All reports in the file GITEMS.TXT As well as GITEMS.TXT, any *.GPT files in C:\Prwin folder are also available GPT files need to be in shared reports folder
The report number is Item 1 in each line. Reports start with the command ReportTitle
Number and Order are not used
same as Prwin1
Item 8 used for 'units'
Item 11 used for 'bold'
Same as 1.0.204 Item 8 used for text OPTIONS
Item 11 used for object COLOUR

Each line in the GPT file has the format...

Number, Order, Command, Source , Alias , Format , Align , Units|Options , Orientation , Size , Bold|Colour , Left, Top , Right, Bottom

Note: If a formula is used that contains commas (e.g. =IF(criteria,Value1,Value2)) , use '~' as the delimiter between items.

ItemNotes
NumberReport number from GNAMES.TXT (not used)
OrderPrinting order (not used)
Commandsee Command Codes
SourceText, data field or formula
Aliasvarious
Formatd/m/y; 0.00; DWU see Format Codes.
AlignLeft; Centre; Right, LB; CB; RB with word wrap
Units1=display units (e.g. mm/day); 0 = no units
OrientationPosition relative to point see Text Boxes and Labels
SizeRelative size of font (100% = standard; 200 = big), or line width in points
Bold1 = bold; 0 = normal
LeftLeft coordinate position
TopTop coordinate position
RightRight coordinate position
BottomBottom coordinate position

Command Codes

Available commands...

CommandPurposePosition Units
ReportTitleSource = report title 
GraphTypeSets the current graph type
0 = Depth Graph | 1 = Time Graph
 
GraphPositionSet current graph position
e.g. 1, 1, GraphPosition,,,,,,,,,10,10,50,45 'position graph
data
GraphTickSizeSet tick sizegraph
GraphLegendPositionSet current graph legend positionpaper
GraphSymbolSizeSet symbol sizegraph
GraphScaleSet current graph scale
e.g.
1, 1, GraphScale,,,,,,,,,1/11/2004,450,CRNTDATE+10,0 'set time graph scale
1, 1, GraphScale,,,,,,,,,10,0,50,120 'set depth graph scale
data
PlotGraphPlots current graph 
PlotAxesPlots just axes 
TextPlot text from data fielddata
LabelPlot a label
(but may contain variables e.g. Ranch \FARMNAME)
data
FormulaPlot result of a numeric formuladata
IndirectFormulaPlot the evaluation of text that is a formula
e.g. 1, 1, IndirectFormula, LOWER,,,,,,,,90,10,95,12 'LOWER contains a formula for lower limit
data
PicturePicture in .BMP or .WMFdata
LineDraw line from Left,Top - Right,Bottom
Source can (optionally) set the colour Size can (optionally) set the line width in points
(also applies to box and arrows)
data
BoxDraw box from Left,Top - Right,Bottomdata
ArrowDraw arrow from Left,Top -> Right,Bottomdata
DoubleArrowDraw double arrow from Left,Top <-> Right,Bottomdata
Gauge'Fuel gauge' showing current RZ1 relative to Full and Refill/PWP, or 'Bucket' of water allocation.
Source = RZ1 or K5, etc
Orientation = 0 = lower base is refill | 1 = lower base is PWP
Align = 0 = Fuel gauge showing RZ1; Align = 1 = plot as bucket of allocated water
Size = relative font size (over-ride default font) of labels
Bold = 0 normal | 1 = bold
e.g. 1, 1, GAUGE,,,,,,1,80,1,60,20,62,35
base PWP; font 80% of standard, bold, gauge at horiz= 60-62%, vertical=20-35%
e.g. 1, 1, GAUGE,K5,,,,,0,100,1,70,20,72,35
cumulative delivered water in keydata row 5, allocated amount entered as maximum, bucket at horiz= 70-72%, vertical=20-35%
data
ColourSet colour for following items 
DrawWidthSet width in points for following linespoints
DrawStyleSet line style lines. 0 = solid | 1 = dottedpoints
FontName = Source; Size = Alias 
IncludeInclude another report. Source = Report name
e.g. 1, 1, Include, DripBlock 'print report called DripBlock
 
GraphRowsSet which rows to plot on time graph.
Source = 0 = All | 1 = Selected | 2 = Field list; Alias = Field list name
e.g. 1, 1, GraphRows, 2, RZ1 'plot field list RZ1
 
GraphColumnsSet which columns to plot on depth graph.
Source = 0 = All | 1 = Selected | 2 = Latest. Alias = NumberOfLatest.
e.g. 1, 1, GraphColumns, 2, 3 'plot last 3 readings
 
v2 Commands below
BeginIfStart of an IF block; Source = condition
e.g.
1 ,1, BEGINIF, CROPNUM=20 'if site crop number = 20 do the following commands
1 ,1, BEGINIF, DRIP 'if site is a 'drip' do the following commands
1 ,1, BEGINIF, Option49 'if site is a 'text import' do the following commands - see option codes
 
BeginElseIfStart of an ELSEIF block; Source = condition
e.g. 1 ,1 ,BEGINELSEIF, FARM = 4 'if farm number = 4 do the following commands
 
BeginElseStart of an ELSE block
e.g. 1 ,1 ,ELSE 'otherwise do the following commands
 
EndIfEnd of an IF block 
ProfileGaugeDiagram showing changes in soil moisture down profile 
GraphOptionSet any option.
Source = numeric code of option; Alias = value of option
e.g. 1, 1 , GraphOption, 21, 1 'set option 21 equal to 1, which is plot Refill point profile on depth graphs
See option codes
 
RestoreSettingsRestore all options to user settings 
NewPagePrint a new page 
OrientationSet paper orientation. Source= 1 = Portrait | 2 = Landscape
e.g. 1,1,Orientaion,2 'switch to landscape
 

Labels, text and formulas

Text can be positioned in two different ways.

  1. If Right, Bottom are entered then...

    e.g.

    3,3,LABEL,Full:,,,R,,1,100,1,88,10,92,12 prints 'Full:' right aligned in a box from 88-92 % horizontal, 10-12 % vertical.
  2. If Right, Bottom are not entered then...

    e.g.

    3,3,LABEL,CRNTAMT,,AMT,1,0,-8,100,0,CRNTDATE,CRNTAMT,, The value of RZ1 is printed just above the last probe reading...

Position Units

The position of a graph and the legend are in percent of paper (or screen) - top left of paper is 0%, 0%; centre of paper is 50%, 50%; bottom right of paper is 100%, 100%

The position of all other items (text, labels, lines, arrows, scales) are in either...

(1) Percent paper units

Left=50, Right=50exact centre of the screen or paper.

or

(2) Data units

Can be specified as either a value or a formula.

If the position is numeric (e.g. 50) it is assumed to be percent % paper units.

Top = 5050% of paper

If alpha or a formula (e.g. FULL+20 or +250 ) it is assumed to be in 'real-world' data units (e.g. mm of water). The value is then converted to percent paper to position the item.

Top = Full + 20Full point + 20

Text and formula options

Prwin2 saves extra options for text and formulas as characters. G = 0 (OFF); H = 1 (ON); I = 2, etc

e.g. GHHGGGGGG will show text in bold, and numeric values with units

CharacterResult
1Plot border around object
2Text in bold
3Show units (e.g. mm)
4Display in red if negative
5-10Spare

Numeric codes for graph options

Numeric codes used with command GraphOption to over-ride user preferences

CodeTime graph...
1Plot Effective Rainfall
2Plot Delivered Rainfall
3Plot Effective Irrigations
4Plot Delivered Irrigations
5Plot Prediction using Probe DWU
6Plot Prediction using Estimated DWU
7Plot Prediction using site formula DWU
8Plot Last Year
9Plot Weather
11Plot Prediction using ScheduleDWU
13Plot Associated3
14Plot DWU calculated from site DWU formula
15Plot Selected global formulas
12TimeLocal
0 = Use Global settings
1 = use local, site-specific, settings for site
CodeDepth graph...
19Plot Permanent wilting point profile
20Plot Full point profile
21Plot Refill point profile
22Shade between Full-to-Refill profiles
23Shade between latest profiles
24Shade between Current-to-Full profiles
25Shade between Current-to-Refill profiles
26Shade between Current-to-Previous profiles
27Plot Last year
33DepthLocal
0 = use Global settings
1 = use local, site-specific, settings for site

Other options...

CodePurposeValues
41GainsSavedIn0 = separate column
1 = keydata rows
42DeliveredIrrigationRowKeydata row for delivered irrigations
43EffectiveIrrigationRowKeydata row for effective irrigations
44DeliveredRainRowKeydata row for delivered rains
45EffectiveRainRowKeydata row for effective rains
46PredictMode0 = existing date/amount system
1 = drip method (amount = DWU*DAYS)
47CorrectForRZ1ChangeAdd any change in RZ1 from previous probe readings
48CorrectForLimits0 = None
1 = stay inside limits
2 = track to average
49AutoImportTextFileAutomatic import from text file and append new data.
Ver2 below
50CorrectForKSoilCorrect DWU using Ksoil when predicting
51ScheduleUserEnteredDateUser has changed the schedule date
52ScheduleUserEnteredAmountUser has changed the schedule amount
53ScheduleWith0 = ProbeDWU
1 = EstimatedDWU
2 = site Historical DWU formula
54ScheduleLocalUsing local setting for CorrectForLimits, CorrectForRZ1Change, DripDays
55CorrectPDWUIf scheduling with PDWU, and PDWU < 0 or > 10, use EDWU (or HDWU)
56AutomaticPostGain???is this the same as Prwin1 ???

Examples of graph report definitions


LineResult
3,3,LABEL,Full:,,,1,0,-6,,0,88,10,, A label with 'Full:', positioned to the left of X=88%,Y=10%
3,4,FORMULA,Full,,AMT,0,1,-2,,0,88,10,, Value of full point in amount (e.g. mm or ins) units, positioned to the right of X=88%,Y=10%
3,3,ARROW,,,,,,,1,, CRNTDATE, CRNTAMT-20, CRNTDATE, CRNTAMT A vertical arrow pointing to the last probe reading...
3,3,LINE,,,,,,,,,BUDBURST,TYMAX,BUDBURST,TYMIN A vertical line at date = BUDBURST (set as global formula)

Ticks and symbols

The size of ticks and symbol are in units of percent of graph size.

Ticks=2 will give 'standard' ticks with a length of 2% of the size of the graph; ticks=100 will give a grid across the graph.

Format codes

Format codes are used to set the display format. The value displayed (e.g. mm or ins, and decimal places) will also depend on ProbeMenu/DisplayUnits

CodeNotes
DWUDaily water use in mm/day
AMTAmount of water in mm
VOLVolume of water in Ml
AREAArea in Ha
DEPTHDepth of reading in cm
VSWVolumetric soil moisture in %
EMITRATEVolumetric soil moisture in %
0.01 decimal place
0.0003 decimal places

Other Microsoft format codes (as used in Excel) can also be used.


Screen definitions (SPT)

Different screen layouts can be customised. Each layout is given a name, and can be chosen on SeasonsMenu/Edit.

To customise screen layout definitions use ProbeMenu/SystemOptions and edit the file SCRITEMS.TXT or SPT file.

Ver2 has a slightly different format with more options, but it also has an SPT editor.

Prior to version 1.0.204 After version 1.0.204 Version 2
  • All screen layout items are in the file SCRITEMS.TXT
  • The layout number was the first item in the line.
  • Layout names were in the file SCREENS.TXT.
  • The file SCREENS.TXT is not used
  • The layout number is not used
  • Different layouts start with the command ReportTitle
  • As well as SCRITEMS.TXT, any *.SPT files in C:\Prwin folder are also available
  • Use SitesMenu/Layoutt to choose a layout.
  • Use SitesMenu/Layout/Edit to configure.
  • All SPT files must be in the shared reports folder.

Each line in the SPT file has the format...

LayoutNumber, Column, Type, Source, Width, Format, Align, Units, Title 'Comment

CodeNotes
LayoutNumberSame number as LayoutName in SCREENS.TXT. (not used after v1.0.204)
ColumnScreen column number, starting at 1
SourceField name, or formula
WidthWidth of column in characters
FormatFormat code for numeric data
AlignLeft | Right | Centre
Units1 = units (e.g. mm/day); 0 = no units
TitleTitle at top of column.
Separate lines with '|'.
Can also include variables e.g. \UAMT will display mm/day
CommentExplanatory text that will be displayed if user right clicks on column title

Examples of screen column definitions...


LineResult on screen
2,0,ReportTitle,PR41Sitesstart of a new layout called PR41Sites
2,1,Text,SITE,6,0,0,0,Site|Num'Site number - entered into Hydroprobe

In column 1

 Site
  Num

   33
1,5,Formula,REFILL,7,AMT,R,0,Refill|\UAMT'Water holding capacity at which the plant shows stress

In column 5

 Refill
     mm

    230
1,6,Formula,FULL-CRNTAMT,8,AMT,R,1,Deficit|\UAMT 'amount required to be applied to bring back to full point

In column 5

 Deficit
      mm

   230mm

Import definitions (IPT)

The lines at the top of the file are set by various options on SitesMenu/Import

These options allow the data to be filtered, only importing a reading every 6 hours, for example

If the data is from continuous logging systems, an irrigation can be automatically posted if there is an increase in soil moisture

There are two types of lines...

Note: ver2 has a different format, but it also has an IPT editor.

Imported columns

The line has the format...

Cn, Format, Start, Width, Row 'Comment

CodeNotes
CnColumn number e.g. C4
FormatG - any numeric
DT - date and/or time
T - text
StartStart of data in characters - not required for delimited data files
WidthNumber of characters - not required for delimited data files
RowNormally 1, but some loggers output data over more than 1 line
Commentany text as a comment or reminder after a ' is ignored.

Examples of column definitions...


LineNotes
C1, DT, 0, 0, 1 'date+timeDate and time information in column 1
C2, G, 0, 0, 1 'rainGeneral data in column 2 (rain in this case)
C3, G, 12, 23 , 1General data, from character positions 12 to 23 incl, in line 1

Destination of imported data

The line has the format...

On,Source,Destination,Calculated 'Comment

CodeNotes
OnOutput number e.g. O3
SourceColumn number (e.g. C3) or a formula
DestinationTYPE | DATE | R1-R16 | SN | K1-K16 - see examples
Calculated0 = calculated, 1 = just a column
Commentany text after a ' is ignored - can be used for comments or reminders.

Examples...

LineNotes
O1~1~TYPE~ 0 'probe1 (code for Probe) put in TYPE
O2~C1~DATE~ 0 'dateDate/Time from column 1 put in DATE
O3~C8~R1~ 0 '20cmValue in column 8 put in Reading 1 (probably 20cm reading)
O4~C12~R2~ 0 '30cmValue in column 12 put in Reading 2 (probably 30cm reading)
O14~C15~K4~ 0 '50 cm temperatureValue in column 15 put in Keydata 4 (temperature ?)
O21~C13~K11~ 0 '40 cm salinityValue in column 12 put in Keydata 11 (salinity)