Dynamic texts
Text modules and text macros play a role wherever texts are used. These can be used in free text, table headings, legend headings and file names.
text modules
easymap offers the possibility to save and reuse text modules. Open a context menu on a text field with a right click. Besides the Windows standard commands, the following additional commands are available:
Text macros
Text macros are texts with variable wording. They are inserted as placeholders, whose actual content is determined by easymap for the first time when the macro is inserted and is updated in the further course of processing (e.g. date, file name etc.).
Text macros simplify labeling at the many places where text can be inserted. They also support the automation of map creation. easymap automatically inserts a text macro into the headline of legends for analyses. For analyses based on only one data column (e.g. area coloring), the macro provides the name of the underlying data column; for analyses based on several data columns (e.g. circle sector diagrams), the macro provides the name of the corresponding analysis.
Text macros can be recognized by curly brackets {}. To create macros, easymap offers an expression generator, which lists the available macros. easymap distinguishes
- global text macros (e.g. date or user name)
- document-related text macros (e.g. file name, title, author or date saved)
- Element related text macros (e.g. descriptions of analyses, tables, data columns)
- user-defined text modules
User-defined text modules are texts or text fragments that are freely defined by the user (see Properties in menu File, tab Variables). These can be used, for example, to enter texts that are used in different places (e.g. on each sheet) once (e.g. name of department, data source, copyright).
Expression Categories
The following expression categories are available for text macros. Via Advanced... you reach a printout generator that offers further categories.
Syntax | Example | ||
Caption | Returns the name of the current graphic export. | Me.Designation
|
{Me.Designation } → "workbooknname" |
Syntax | Example | ||
CurrentKey | Returns the number of the currently displayed report element. | Report.currentNumber
|
{Report.CurrentNumber} → "2" |
CurrentName | Returns the name of the currently displayed report element. | Report.currentName
|
{Report.CurrentName} → "North" |
CurrentPageCaption | Returns a name of the current page generated by easymap. This corresponds to the page names on the right side in the report preview. | Report.current page name
|
{Report.CurrentPageName} → "Area 2 "North""" |
Caption | Returns the name of the report in the content. | Report name
|
{Report.Designation} → "Report 1" |
EntityName | Returns the name of an area of the report level. | Report element description
|
{Report.element.description} → "Region" |
The Analysis expression category is only available in the context of legend headings and individual diagrams.
Syntax | Example | ||
Feature description | Returns the displayed design feature (e.g. "color") in text form. | Analysis.design feature
|
{Analysis.design feature } → "Color" |
ClassesCount |
Returns the number of classes or 0 for classless evaluations. Note: Please note that no class number is supplied if the analysis is not classified (e.g. continuous color gradient, diagram analysis). |
Analysis.number of classes
|
{Analysis.Number of classes } → „3“ |
ClassDistribution |
Returns the method used to calculate the class distribution for the analysis. Note: Please note that an empty string will be returned if the analysis is not classified (e.g. continuous gradient, diagram analysis). |
Analysis.class distribution
|
{Analysis.class distribution } → "Equally Distributed" |
Column Caption |
Returns the name of the analyzed column to which the legend matches. Note: Please note that an empty string will be returned if the analysis is not bound to a single column (e.g. diagram analyses, uniform symbols). |
Analysis.ColumnCaption
|
{Analysis.column caption } → "Inhabitants |
TableCaption | Returns the name of the table on which the analysis or single chart is based. | Analysis.TableCaption
|
{Analysis.table description } → "Population data" |
The expression category Sheet is only available in the context of objects that are on a sheet (for example, text elements, legend headings).
Here you have access to the properties of the sheet in which the object is located. Since tables, for example, cannot be assigned to a specific sheet, these properties are not available for calculated columns or filters.
Syntax | Example | ||
Caption | Returns the name of the sheet in which the object is located. | Sheet Description
|
{Sheet.Designation } → "Sheet 1" |
Various functions are available to output the current date or format date values.
Syntax | Example | ||
Date | Returns the current date (without time) in the format of the current system settings. | Date
|
{date } → „10.01.2015“ |
Now | Returns the current date (incl. time). The formatting of this date depends on the system setting. | Now
|
{Now } → „10.01.2015 15:03“ |
Time | Returns the current time in the format of the current system settings. | Time
|
{Time } → „15:03“ |
Here you have access to the properties of the workbook, which you can enter in the properties (Menu File → Properties).
Syntax | Example | ||
Caption | Returns the name of the sheet in which the object is located. | workbook.name
|
{workbook.name } <font color="#ffff00">-=→=- proudly presents |
Filename | Returns the name of the workbook. | Workbook.filename
|
{workbook.filename } <font color="#ffff00">-=→=- proudly presents |
Filepath | Returns the file name of the map folder. | Workbook.file path
|
{workbook.filepath } <font color="#ffff00">-=→=- proudly presents |
Here you have access to the properties of the workbook, which you can enter in the properties (Menu File -> Properties).
Syntax | Example | ||
UserDisplayName | Returns the name of the user. | workbook.display name
|
{workbook.Displayname } → "Mustermann, Marianne" |
Username | Returns the name of the logged on user. | workbook.username
|
{workbook.username } → "Mustermann" |
Domain | Returns the name of the Windows domain of the computer. | workbook.domain
|
{workbook.domain} → "Sample company" |
easymap office version | Returns the version name of easymap. | workbook.EasyMapVersion
|
{workbook.EasyMapVersion } → "EasyMap 10.4 SP 0 (10.4.0.123 10.06.2015)" |
Licensee | Returns the name of the licensee. | workbook.licensee
|
{workbook.licensee } → "Mustermann AG" |
Hostname | Returns the name of the computer used. | workbook.computer name
|
{workbook.hostname } → "ABC 123 Pattern" |
Here you have access to the properties of the sheet in which the object is located.
Syntax | Example | ||
Author | Returns the name of the author of the workbook. | workbook.author
|
{workbook.author } → "Mustermann, Marianne" |
Subject | Returns the subject of the workbook. | workbook.subject
|
{workbook.subject } → "Sample map" |
Created On | Returns the creation date and time of the workbook. | workbook.CreatedAm
|
{workbook.CreatedAm } → „01.01.2015 16:20:24“ |
Created by | Specifies which user created the workbook. | workbook.CreatedBy
|
{workbook.CreatedBy } → "Mustermann, Marianne" |
Category | Returns the category of the workbook. | workbook.category
|
{workbook.category } → "Sample Maps" |
keywords | Returns the keywords of the workbook. | workbook.keywords
|
{workbook.Keywords } → "EasyMap, DistrictManager Edition, Territory Organization" |
Comment | Returns the comment from the properties of the workbook. | workbook.comment
|
{workbook.comment } → "Territorial Organization, First Draft" |
revision | Shows how often the workbook has been saved. | workbook.revision
|
{workbook.revision } → „27“ |
status | Returns the status of the workbook entered by the user. | workbook.status
|
{workbook.status } → "done" |
Title | Returns the title of the workbook. The title corresponds to the file name without file extension. | workbook.title
|
{workbook.title } → "unnamed" |
Last saved on | Returns the date and time when the workbook was last saved. | workbook.LastSavedAm
|
{workbook.LastSavedAm } → „24.08.2015 01:20:51“ |
Last saved by | Specifies which user last saved the workbook. | workbook.LastSavedFrom
|
{workbook.LastSavedFrom } → "Mustermann, Max" |
Here you have access to the properties of the workbook, which you can enter in the properties (Menu File -> Properties).
Returns the name of the table that was used to display the table object.
Syntax | Example | ||
Caption | Returns the name of the element. | Table Description
|
{Table.Designation } → "Customer data" |
In this category some functions are offered to work with texts or character strings.
Syntax | Example | ||
NewLine | Constant for a line break. The constant can be used to output text in multiple lines. | NewLine(<<lt;text>> "start >" sign>)
|
{ Header 2 |
Error when evaluating expressions
error text
The combination of type '<Type>' and type '<Type>' is not compatible with the '{0}' operator.
explanation
An attempt is made to use an operator to link two values for which this operator is not suitable.
Example:
Multiplication of two character strings.
Correcting the error
Both operands must be converted to the appropriate type, usually a number. The value() conversion function can be used for this purpose.
Value("3")*Value("3")
error text
No matching function with the name '<Function>'
found.
explanation
There are two possibilities:
Either a function with this name does not exist because you entered the function name yourself and there is an error in the spelling.
Or the function exists, but is called with an invalid data type.
Example
Wrongly written function.
Aps(-5)
Absolute value with a string as argument.
Abs("-5")
Correcting the error
For the first error situation: Correct the spelling.
For the second error situation: Convert the function argument to the appropriate data type. The conversion function value() can be used for this purpose.
Abs(value("-5"))
error text
The '<Name>' property or variable does not exist.
explanation
Their expression contains parts that do not correspond to constants, functions, or operators.
Maybe it's a typo?
The most common cause, however, might be that you have not limited a string with quotation marks ("quotation marks"), but are using it directly.
Example
ABC+DEF
Correcting the error
Use quotation marks to delimit the strings:
"ABC "+"DEF"
error text
syntax error
explanation
Your printout is not a valid printout.
It could be that their expression simply contains 2 separate expressions.
Example
Correcting the error
Divide the expression into 2 expressions:
The output of this expression would then be 7 11.
error text
A call target has caused an exception error.
explanation
In contrast to the other errors, this error only occurs when their expression has to be evaluated. This can lead to errors that cannot yet be detected when the printout is checked, but only occur during evaluation.
Example
{Value([columnA])
}
This expression converts all values from columnA to a number. However, if columnA contains a value that cannot be converted into a number, the error described above occurs.
Correcting the error
In this case, by correcting the data, you must ensure that your printout works with all available data.