The Power Clock report engine is only intended for advanced computer users, preferably with programming experience. It is too difficult and complex to be used by most casual computer users.
The engine is forgiving of mistakes in input but there is a chance you will experience some GPF's (general protection fault) or other 'hard' errors if you use commands incorrectly. It is highly recommended that you copy one of the built-in reports and design your new report using that as a basis.
Reports are defined with a series of single character commands followed by parameters. Parameters enclosed in "[ ]" are optional. The backslash character usually separates parameters. Anytime an expression is asked for you may use any of the arithmetic operators and formulas. Strings must be enclosed in double quote characters. A list of formulas is available from the report-editing screen. Data fields must be enclosed in brackets [filename.data field]. Fields in related tables may also be used. For example: [Time.Per.Hourly Rate].
; <comment>
Any line that starts with a semicolon is considered a comment and is ignored by the report processor.
Data <data file name>
Set the data file to use as a basis for the report
<Data file name> is the base name of the data file to use to create the report. Possible names are the filename of any data file minus the .FF2 extension. The data file must be specified before any other commands are used.
Example: Data PER
Selects the employee file.
Ask <variable name>
Ask for report variable
<variable name> is the variable name to be used elsewhere in the report script.
Possible values are:
DateRange, Curemp, Location, IncludeLunch, Inactive, Job
Example: Ask DateRange
Index <keyname> [ <lowkey> <highkey>]
Set index key range for report
<keyname> must be an index of the data file being used for the report.
<lowkey> is an expression defining the lower bound of the key range.
<highkey> is an expression defining the upper bound of the key range.
Example: Index Date sdate edate
Title <report title expression>
Sets the title to be shown at the top of every page of the report.
Example: Title "Report for "+[per.name]
Sort <order1>[|<order2>|<order3>
]
Sorts the report records. <order1>, etc
are expressions defining the sort order for the report. The pipe character, "|", separates expressions. Records are sorted first by the first expression, second by the second, etc
Example: Sort [per.last name]|[per.first name]
When <when expression>
The report will only print records that match the <when expression>.
Example: When [hours] > 10
Group <Groupname> <group expression> \ [<group description>] [\W <width>] [\EA] [\EB]
Adds a grouping level to the report. <Groupname> must not contain any spaces or numbers. Records are grouped according to the <group expression>. Two new bands are added, the group header and group footer. Selecting the band with the 'Band' command allows you to add fields to those bands.
\EA option to makes the page eject after each group footer is printed.
\EB option to makes the page eject before each group header is printed.
If <group description> expression is included then the group description is added to the group headers and footers.
An unlimited number of groups may be added.
Example: G Person [per.id] [per.name] \EA
Group the records by employee. Eject after each employee. The person's name is printed in the group headers and footers.
Band <band name> [\W <when expression>] [\L <Lines>] [\F <font name>, <font size> <BOLD> <ITALICS> <ULINE> <color>
Selects the current band. Subsequent fields and variables will be added to the selected band. Possible band names are: ReportHeader, ReportFooter, PageHeader, PageFooter, Detail, GroupHeader, and GroupFooter.
\W <when expression> is included then the band is only printed with that expression is true.
\L <Lines> forces the height of the band to a number of lines.
\F changes the font of the band
Example: Band PersonFooter \W [per.hourly rate] > 50 \F arial, 20 Red Bold
Header <header band name>
Sets the header band. All subsequent fields added to the detail band will have a header added to this band. By default the header band is the page header and is printed at the top of every page. If you have a complex group report, you may want to set the header band to one of the group headers.
Example: Header PersonHeader
Var <variable expression> [options
]
Adds a report variable. The variable may be used in other expressions throughout the report. An unlimited number of report variables may be added. The variable is recalculated in whichever band it is placed.
Options:
\N <variable name>
Name of the variable. Variable names must not contain any spaces. Case is not significant. When the variable is named it may be used in other expressions in the report.
\S <sum type>
Summarize the variable. <Sumtype> must be one of the following: SUM, AVG, CNT, MIN, MAX. If no reset parameter is given then the variable is never reset. If you want to sum for every record then be sure to put the variable in the detail band.
\R <reset on group number>
Reset the variable to 0 whenever the group specified changes.
\P <numeric places>
Force a numeric variable to the specified number of decimal places. This is useful if you don't want to specify the places in every field that references the variable.
\I <initial value expression>
An expression specifying the initial value of the variable when it is reset.
\W <when expression>
Use this to calculate only when the when expression is true.
Example: Var [per.hourly rate]*1.5 OvertimeRate \N OTAmt
Field <expression> [options
]
Adds an output field to the current band. Usually fields are added to the detail band. The F command has options to automatically add summary fields to all the footer bands and a header to the header band.
Options:
\H <Header text>
A header will be added to the current header band. If you don't include the header text then the header will be the field name if it is a simple expression. To override the default header, include the header text. The header text must be a simple string, not an expression.
\R <Sumtype>
Summarize the field and optionally add summary fields to all report footers. <Sumtype> must be one of the following: SUM, AVG, CNT, MIN, MAX.
\S <SumType>
This is the same as the summary command above except the it only ripples the summary through all footers. The field is not summarized in the current band. This is useful in the detail band.
\WHEN <when expr>
<when expr> is a boolean expression that determines if the field will be printed.
\P <char width> <places>
Sets the width of the field in character spaces. For example, if an expression calculates a number that shows as 999.9999, you may force it to 2 places by including 10 2 in the field command. You may also need to shorten a string expression if it calculates too long.
\WID <width in pixels>
Sets the width of the field in pixels.
\@ <position x in chars> <position y in chars>
Sets the position of the field in character units. The position is relative to the top left corner of the current band.
\F <font name> <font size> <font style> <font color>
Sets the font for the field. <Font name> may be any Windows font. <Font Size> is the size in points for the font.
<font style> must be one or more of the following: BOLD, ITALICS, ULINE. Separate multiple styles by spaces. Any unknown style is interpreted as a color.
\J <justify code>
Sets the justification for the field. Fields are automatically justified depending on what type they are. Numbers are right justified.
\JC = Center Justify
\JR = Right Justify
\JL = Left Justify
Example: Field [time.hours] sum Total Hours


