Recent News
|
InnPlanner 2010 Released
New faster database engine, more customization features, weekly tariffs, full multi-user work support and much more...
| |
InnPlanner 2010 RC1
InnPlanner 2010 Release Candidate 1 is ready for downloading and testing. You can download it from the "Downloads" section.
|
|
|
Hotel Software Documentation
Formatting Data
Formatting can be carried out either using formatting strings or via a
special dialog window.
When formatting by means of a string, the first four characters define the
type of formatting, and the rest of the characters - the formatting details. For
example:
- date Y.m.d.
- math ###'###0.00
- bool yes/no.
When printing values from variables, the formatting line follows the ^
sign; for example:
- [$order_date^date Y-m-d]
- [$total^math ###'###0.00]
- [$vip^bool yes/no]
Index
- Mathematical Format (math)
- Date Format (date)
- Time Format (time)
- Boolean Format (bool)
- Text Format (text)
- Recordset Format (rset)
Mathematical Format
Is used for formatting digits.
Format string example: math ###-#0,00
- "-" - means a symbol used to separate groups;
- "," - means a symbol used to separate decimal part;
- Number of "#" means the number of digits in a group;
- Number of "0" means the number of digits after decimal.
You can use "*" to view all digits after decimal.
- If you specify |NO_ZERO| in the format text box, and the output value is a zero, no value will be shown.
Examples:
| Test String | Format String | Result
| | 1234567,89 | math ###'#0.00 | 1'234'567.89
| | 1234567,89 | math ### #0.0 | 1 234 567.9
| | 1234567,89 | math $###,#0 | $1,234,568
| | 1234567,89 | math #0,00EUR | $1234567,89EUR
| | 0 | math #0|NO_ZERO| |
|
Date Format
Is used for formatting dates.
Format string example: date dd-mm-yy
- m - Numeric representation of a month, without leading zeros (1, 2, 12);
- mm - Numeric representation of a month, with leading zeros (01, 02, 12);
- mmm - a short textual representation of a month, three letters (Jan, Feb, Dec);
- mmmm - a long textual representation of a month (January, February, December);
- d - Day of the month without leading zeros (1, 2, 24);
- dd - Day of the month with leading zeros (01, 02, 24);
- ddd - A textual representation of a day, three letters (Mon, Tue, Sun);
- dddd - A textual representation of a day (Monday, Tuesday, Sunday);
- yy - year, 2 letters (99, 00, 04);
- yyyy - year, 4 letters (1999, 2000, 2004).
Examples:
| Test String | Format String | Result
| | 16 April 2005 | date yyyy-mm-dd | 2005-04-16
| | 16 April 2005 | date dd mmmm 'yy | 16 April '05
| | 16 April 2005 | date dd mmm yyyy (dddd) | 16 Apr 2005 (Sunday)
|
Time Format
Is used for formatting time.
Format string example: time hh:mm:ss AMPM
- h - hour without leading zeros (2, 11);
- hh - hour with leading zeros (02, 11);
- m - minute without leading zeros (2, 59);
- mm - minute with leading zeros (02, 59);
- s - second without leading zeros (2, 55);
- ss - second with leading zeros;(02, 55)
- Use the "AMPM" string to show time in the AmPm format.
Examples:
| Test String | Format String | Result
| | 18:30:45 | time hh:mm:ss | 18:30:45
| | 18:30:45 | time hh:mm:ss AMPM | 06:30:45 PM
| | 18:30:45 | time h:mm:ss AMPM | 6:30:45 PM
|
Boolean Format
Is used for formatting Boolean values (the values that can only be true or
false). False means an empty string or
0, true means any string or number other than zero.
Format string example: bool TrueText/FalseText
- TrueText will be printed if the value is true
- FalseText will be printed if the value is false.
Examples:
| Test String | Format String | Result
| | "1" | bool Yes/No | "Yes"
| | "0" | bool Yes/No | "No"
| | "230" | bool Yes/No | "Yes"
| | "" | bool Yes/No | "No"
| | "false" | bool Yes/ | ""
| | "Hello World" | bool Text | "Text"
| | "" | bool Text | ""
|
Text Format
Can be used for formatting any values.
Format string example: text Flags
Flags - flags separated by ";"
- UCASE - convert text to upper case
- LCASE - convert text to lower case
- LEFT(N) - show only first N symbols (e.g. LEFT3)
- RIGHT(N) - show only last N symbols (e.g. RIGHT5)
- TRIM - delete leading spaces from the text.
- SYMB(N) - show the N symbol of the text.
- WORD(N) - show the N word of the text.
- LINE(N) - show the N line of the text.
- NOTAGS - remove html tags from the text (<a>,</b>, etc).
- FROMstr - returns text beginning with the first entry of the str
string.
- UPTOstr - returns text before the first entry of the str
string.
- REPMfind->replace - Replaces all find
entries in the string with replace.
- REPOfind->replace - Replaces the first find
entry in the string with replace.
- CODE(N) - Encrypts string with the XOR method. N - encryption offset.
When you use SYMB, WORD and LINE,
a zero N value stands for the first character, first word and line respectively.
Flags are applied to the line in the order of their appearance
in the format text box. Thus, if you want to get the first
3 characters of the second word, you should use the "WORD1;LEFT3" combination.
Examples:
| Test String | Format String | Result
| | Hello World!!! | text UCASE | HELLO WORLD!!!
| | Hello World!!! | text LCASE | hello world!!!
| | Hello World!!! | text LEFT5 | Hello
| | Hello World!!! | text RIGHT4 | d!!!
| | Hello World!!! | text LEFT5;UCASE | HELLO
| | Hello World!!! | text LEFT-5; | Hello wor
| | Hello World!!! | text WORD0 | Hello
| | Hello World!!! | text WORD1;LEFT3 | Wor
| | Hello World!!! | text WORD1;SYMB2;UCASE | R
| First line Second Line | text LINE1; | Second Line
| | Hello World!!! | text FROMWor | ld!!!
| | Hello World!!! | text UPTO! | Hello World
| | Hello World!!! | text REPMl->x | Hexxo Worxd!!!
| | Hello World!!! | text REPOl->x | Hexlo World!!!
| | Hello World!!! | text CODE7 | Obkkh'Phukc&
|
Recordset Format
This format is used for printing records contained in a variable of the
recordset type as text.
Such variable can be created, for instance, with a query or, for instance, in a many-to-many
relational field. This format appears as a list of fields, data from
which is to be displayed.
Suppose, we have a variable [$recs] that contains 3 records with the
following field values:
| Date | Title | Quantity | Total
| | Record 1: | 2006-07-14 | Apple | 5 | 15
| | Record 2: | 2006-07-16 | Tomato | 10 | 20
| | Record 2: | 2006-07-19 | Juice | 4 | 16
|
Let's show how they will appear with different rset formattings:
| Test Text Formula | Result
| |
| | [$recs^rset |Title|, ] | Juice, Tomato, Apple
| |
| | [$recs^rset |Title| - $|Total|; ] | Juice - $16; Tomato - $20; Apple - $15
| |
|
[$recs^rset |Date|: |Title| - $|Total|[br]] ([br] - means line BReak)
| 2006-07-14: Juice - $16 2006-07-14: Tomato - $20 2006-07-14: Apple - $15
| |
| |
[$recs^rset |Title|, Quantity=|Quantity|;[br]]
| Juice, Quantity=4;
Tomato, Quantity=10;
Apple, Quantity=5
| |
| |
[$recs^rset "|Title|", "|Quantity|"[br]]"
| "Juice", "4"
"Tomato", "10"
"Apple", "5"
|
Please note that in the last example there is an additional quote before the
tag closure. That is necessary since the delimiter (in this case that's the
"[br]) is not to be placed.
Thus, the rset format is the foundation for outputting record set values.
For performing operations over records in a recordset variable, use the cycle
For Each Record From Recordset.
See Also:
Report Style Editor
Text Formulas
Custom Export
|
|
|
|
Today"s Poll
What software do use for your inn/b&b/hotel/etc?
|