Using the Template Builder

About the Template Builder

Getting Started

Expressions

Controls


About the Template Builder

The Template Builder application comes bundled with the Datapage+ installer. This separate application provides you with the tools needed to create your own report templates for use with Datapage+. Templates configure the way your statistical data is presented in the report. They provide a pattern for displaying your part data. While a template exists as a single page in this software, your statistical data for a report may span several pages. Your template will be reused for each page of data in that report.

The Template Builder

Using the Template Builder you can configure how Text, Chart, and CAD information is displayed.

Note that in this version of Template Builder you cannot mix different report types together. Your template must be a Text template, a Chart template or a CAD template.

This documentation covers these main topics:

  • Getting Started with Template Builder

  • Expressions

  • Controls


Getting Started with Template Builder

To help you get started with using the Template Builder, this section contains a topic providing you with some background on the user interface as well as a Tutorial creating a sample template.

  • Template Builder User Interface

  • Tutorial: Creating a Template


Template Builder User Interface

About the Template Builder User Interface

The Main Toolbar

The Controls Toolbar

The Main Canvas

The Properties Pane


About the Template Builder User Interface

The Template Builder User Interface

The Template Builder's user interface contains these main elements.

  1. The Main Toolbar - This top toolbar is the main toolbar. It lets you open or save templates; work with controls on the main canvas; perform cut, copy, and paste operations; perform zoom or fitting operations on the main canvas; and access the help file.

  2. The Controls Toolbar - This side toolbar contains the controls you can add to the main view as well as the ability to select multiple controls.

  3. The Main Canvas - This is the main staging area for your controls. You can add controls to this area and then reposition them as desired. Once you add a control to the canvas, that control becomes available for selection from the Controls list, located just above the Properties Pane.

  4. The Controls List - This drop-down list displays all of the controls added to the main canvas. Selecting an item from this list causes its properties to appear in the Properties Pane just below it.

  5. The Properties Pane - This pane contains a listing of all the available objects added to the canvas as well as the properties available for any object selected on the canvas..


Template Builder Toolbar

Note: Some operations on this toolbar require you to have multiple controls selected. You must use the SelectorControl on the Controls toolbar to select more than one control.

  1. New Template - This creates a new template. If you are working on an existing template, the software will display a message asking if you are sure you want to create a new template. If you click yes, it will overwrite the existing open template.

  2. Open Template - This displays an Open dialog box showing all the templates stored in the TemplateRpts sub-directory located where you installed Datapage+.

  3. Save Template - This saves any modifications made to the open template. If the template being saved is a new template it will display a Save As dialog box so you can name and store the template in whatever directory you desire. Note that templates are typically stored in the TemplateRpts sub-directory located where you installed Datapage+.

  4. Save Template As - This displays a Save As dialog box so you can name and store the template with a new name or in a new directory.

  5. Paste - This pastes on the main canvas the last control or controls that you have copied or cut.

  6. Cut - This cuts the selected control or controls from the main canvas and stores them for pasting.

  7. Copy - This stores a copy of the selected control or controls from the main canvas for pasting.

  8. Delete - This deletes selected control or controls from the main canvas.

  9. Undo - This undoes the most recent manipulation to a control or controls.

  10. Redo - This redoes the operation undone with the Undo button.

  11. Align Left - This aligns the left edges of selected controls together. If you used the CTRL key to select multiple controls then it aligns all the controls to the left-most edge of the first selected control.

  12. Align Right - This aligns the right edges of selected controls together. If you used the CTRL key to select multiple controls then it aligns all the controls to the right-most edge of the first selected control.

  13. Align Bottom - This aligns the bottom edges of selected controls together. If you used the CTRL key to select multiple controls then it aligns all the controls to the bottom-most edge of the first selected control.

  14. Align Top - This aligns the top edges of selected controls together. If you used the CTRL key to select multiple controls then it aligns all the controls to the top-most edge of the first selected control.

  15. Align Horizontal Center - This positions selected controls horizontally along the screen so that their centers will all line up along an imaginary vertical axis. If you used the CTRL key to select multiple controls, their centers will all line up along the first selected object's vertical axis.

  16. Align Vertical Center - This positions selected controls vertically along the screen so that their centers will all line up along an imaginary horizontal axis. If you used the CTRL key to select multiple controls, their centers will all line up along the first selected object's horizontal axis.

  17. Distribute Horizontal - This positions the selected controls horizontally on the screen so that there are no overlapping controls. to have all your controls in a single row, for example, you would first click Align Vertical Center and then Distribute Horizontal.

  18. Distribute Vertical - This positions the selected controls vertically on the screen so that there are no overlapping controls. To have all your controls in a single column, for example, you would first click Align Horizontal Center and then Distribute Vertical.

  19. Group - This groups multiple controls together and treats them as a single object for the intents of positioning on the canvas. The Properties Pane is hidden when you have a group selected. You can also right-click and select Group from the Grouping sub-menu.

  20. Ungroup - This separates a group of controls back into individual controls. You can also right-click and select Ungroup from the Grouping sub-menu.

  21. Bring Forward - If you have two or more controls in a stack that share a portion of the same physical space on the canvas, this brings the selected control up one level. You can also right-click and select Bring Forward from the Order sub-menu.

  22. Bring To Front - If you have two or more controls in a stack that share a portion of the same physical space on the canvas, this brings the selected control to the top of the stack. You can also right-click and select Bring To Front from the Order sub-menu.

  23. Send Backward - If you have two or more controls in a stack that share a portion of the same physical space on the canvas, this sends the selected control down one level. You can also right-click and select Send Backward from the Order sub-menu.

  24. Send To Back - If you have two or more controls in a stack that share a portion of the same physical space on the canvas, this brings the selected control to the bottom of the stack. You can also right-click and select Send To Back from the Order sub-menu.

  25. Same Height - This changes the height for selected controls so that they all match. If you dragged a box to select the controls, and a majority of the controls are already set to a common height, all the controls will be set to that height. Otherwise it will set the controls to the largest height of those controls selected. If you used the CTRL key to select multiple controls, all the controls will use the same height as the first selected object.

  26. Same Width - This changes the width for selected controls so that they all match. If you dragged a box to select the controls, and a majority of the controls are already set to a common width, all the controls will be set to that height. Otherwise it will set the controls to the largest width of those controls selected. If you used the CTRL key to select multiple controls, all the controls will use the same height as the first selected object.

  27. Same Size - This changes the height and width for selected controls so that they all match. If you dragged a box to select the controls, and a majority of the controls are already set to a common size, all the controls will be set to that size. Otherwise it will set the controls to the largest size of those controls selected. If you used the CTRL key to select multiple controls, all the controls will use the same size as the first selected object.

  28. Zoom In - This magnifies the main canvas.

  29. Zoom Out - This shrinks the main canvas.

  30. Whole Page - This zooms in or out on the main canvas until it fits within the window.

  31. Help - This accesses the help file.


The Controls Toolbar

The Controls toolbar exists down the left side of the software. It contains all the controls you can add into a template as well as a control to select other controls. For information on the available controls see the "Controls" topic.


The Main Canvas

Main Canvas

This is the main staging area for your controls. You can add controls to this area and then reposition them as desired. Once you add a control to the canvas, that control becomes available for selection from the Properties Pane.

The main canvas also appears in the Properties Pane (shown as mainCanvas) and contains its own properties as well. See "The Properties Pane".

Margins

You can also use the main canvas to adjust your margins. To do this, simply grab the blue triangles above and to the left of the canvas and drag them to a new location.

You can align controls to the margins by dragging the control near a margin line until it becomes highlighted.

When you release the mouse, the control will align its closest edge to the highlighted margin line.


Properties Pane

Properties Pane

The Properties Pane exists on the right side of the software. It displays the properties associated with the currently active control. You can make a control active by clicking on it or by selecting it from the main canvas or by from the Control list located just above this pane.

Properties make up the characteristics of a control. For example, you can use this pane to modify properties to define the background color of a TextControl or the border's thickness on a RectangleControl.

For information on properties for a specific control see the documentation about that control from the "Controls" topic.


Tutorial: Creating a Template

This tutorial walks you through the process of creating a simple template for a text report using Template Builder. This will teach you the fundamentals of working with the Template Builder. You will use the Demo part and database that are shipped with Datapage+. And you will need to switch between Datapage+ and Template Builder occasionally.

  • Step 1: Create a Header

  • Step 2: Insert Expressions

  • Step 3: Choose the Report Type

  • Step 4: Create a Footer

  • Step 5: Test the Final Template


Step 1: Create a Header

In this step you will create a header that will display the report type, the operator name, the part name, and a company image.

  1. Before you begin, use the Properties Pane and ensure that the template's mainCanvas is set to a PageOrientation of Portrait.

  2. Click the GridControl icon [image] from the Controls toolbar on the left side of the canvas. Position it at the top left of the margin lines. Its properties appear in the Properties Pane.

  3. Set these properties to position and size the control. Set Left to 30, Top to 30, Width to 350.00 and Height to 100.00.

  4. Define two columns. Click the ... button for ColumnDefinitions property. From the Collection Editor dialog box, click Add Item twice. This will add two columns shown as [1]ColumnDefinition and [2]ColumnDefinition into the dialog box and into the control.

Collection Editor showing the two added columns

  5. Click Close to close the Collection Editor.

  6. Define two rows. Click the ... button for RowDefinitions property. From the Collection Editor dialog box, click Add Item twice. This will add two rows shown as [1]RowDefinition and [2]RowDefinition into the dialog box and into the control.

  7. Click Close to close the Collection Editor. The control now has three columns and three rows.

  8. Select the GridControl0 on the canvas and double-click on it to activate the control.

GridControl activated

  9. Click on the top cell in the left-most column and type, "Report Type:".

  10. Click on the middle cell in the left-most column and type, "Part Name:".

  11. Click on the bottom cell in the left-most column and type, "Operator:".

  12. Select the entire left-most column and right-click on it. The Grid Property dialog box appears.

  13. Click Background Color and choose a light-green color (#FFF4FDF6) and then click OK.

  14. Click the Font button:

  15. Using the Font Chooser, change the Font to Arial, the Font weight to Bold, and Font size to 18.

  16. Click OK to close the Font Chooser.

  17. Now delete the right-most column, since we won't be needing that. Click on the ... button for ColumnDefinitions, and select [2]ColumnDefinitions and click Delete Item and then Close.

  18. Change the thickness of the inside grid lines. Set InsideFrame to Thick. The GridControl should look like this:

Final Gridcontrol

  19. Now we're going to add a company logo to our header. Click the ImageControl icon [image] and drag a box to the right of the GridControl on the canvas. Drag the image control so that its left edge touches the right edge of the grid control. Expand the right edge so that it reaches the edge of the canvas.

  20. Click and select GridControl0. Then hold down the CTRL key, and click on ImageControl0 so that they're both selected. The ImageControl0 should be selected second.

  21. Click the Same Height icon [image] from the main toolbar. If working with only two objects, this makes the last selected object the same height as the first selected object. So, your image control should now be the same height as your grid control.

  22. Click the Align Bottom icon [image] from the main toolbar. This aligns the bottom edges of the two controls.

  23. Now using the ... button for the image control's Source property, choose an image of your choice for your logo.

  24. Next we're going to add a border around ImageControl0 on the main canvas. Click the RectangleControl icon [image] and drag a box around the image control. Drag the edges so that it lines up with GrildControl0 and surrounds the image.

  25. Change BorderThickness to 1.50,1.50,1.50,1.50. This increases the border thickness by 50% for each of the four sides on the rectangle control.

  26. Use drop down list next to the BorderBrush property and set the border color to black.

Your header structure is now done and should look something like this:

A Finished Header

In this step you have added three different controls and have modified properties for each to create your template's header structure. In the process you have learned some basics about adding controls and modifying properties.

In the next step you will learn how to add expressions onto your template.

Next Step


Step 2: Insert Expressions

Previous Step

In this step, you will finalize your header by adding in expressions into some of the cells of the GridControl. Expressions are special commands that pull information on the fly from the database into your report. This step will show how expressions can display the report type, the part name, and the operator.

  1. If you haven't already done so, select and then double-click to activate GridControl0 on the main canvas.

  2. Click on the blank cell to the right of the cell with the "Report Type:" text (column 2, row 1). It will turn blue. Right-click on the cell. This brings up the Grid Property dialog box.

Grid Property dialog box

  3. Notice that the Cell type is currently set to Text. We want to change the properties for this cell so that it can display expressions, specifically an expression that will display the report type.

  4. So, change the Cell type to Expression. This enables the Cell expression list.

  5. In the Cell expression list, select the =TextReportType expression.

  6. Click Apply and then OK to close the Grid Property dialog box. The expression now appears in the cell.

  7. Click on the empty cell to the right of the "Part Name:" text.

  8. Follow steps 4-6 again only this time, set the expression to =PartName.

  9. Click on the empty cell to the right of the "Operator:" text.

  10. This time, simply type the expression. Type "=Operator" (without the quotes). When you directly type an expression as text into a GridControl cell or other supported control, Template Builder recognizes and uses the expression as expected.

Now that you've gone through these steps to add expressions into the cells, your final header should look like this:

Header with Expressions

In this step you have learned what expressions are and how to insert them into a template's GridControl.

In the next step you will add a specific report type control to your report template that defines the type of template.

Next Step


Step 3: Choose the Report Type

Previous Step

In this step you will add a TextObjControl into your template to define the template as a text report template. This means in Datapage+ that this template will only function in the Text tab; it will not work with the CAD or Chart tabs.

  1. From the Controls toolbar, click the TextObjControl icon [image] and then add the control to the canvas.

  2. Now we will size the control so it fills up most of the remaining canvas while leaving some space at the bottom for a template footer that we will add later in this tutorial.

  3. With TextObjControl0 selected from the canvas, set these properties:

    • Left to 30.00

    • Top to 145.00

    • Width to 760

    • Height to 875

Note that this control and then other report type controls acts as a container that Datapage+ will fill up with data. If more data exists than can be displayed within the constraints of this object, then a new page of the report will be automatically generated using the exact same template.

  4. Similar to how you did it in step 1, add a RectangleControl [image] around TextObjControl1. Notice when you add another control of the same type to the canvas that the control is given a unique name by incrementing the number at the end.

  5. Set properties to this new rectangle control (RectangleControl2) to the following:

    • Left to 30

    • Top to 140

    • Width to 763

    • Height to 885

    • BorderBrush to Black

    • BorderThickness to 2.00,2.00,2.00,2.00

  6. From the main toolbar, click the Save Template icon [image] and save the template in the TemplatesRpts subdirectory where you installed Datapage+. In the Save As dialog box give the template a name of "CustomTextReport". Notice that the ".TxtRpt" filename type is automatically selected because Template Builder automatically detects the type of template. When saved, the name of the template appears in the title bar of Template Builder.

When finished your report template should look something like this:

Template with a TextObjControl

In this step you defined the type of template by adding in a report type control (in this case a TextObjControl). In the next step, you will create a footer for the template.

Next Step


Step 4: Create a Footer

Previous Step

In this step you will create a footer for the template. This footer will also use expressions to show the current date, page numbers, as well as provide an area into which the person viewing the report can type his or her own notes prior to saving or printing the report inside of Datapage+.

  1. Click TextBlockControl [image], and drag it onto the canvas space at the bottom.

  2. Temporarily change the background color for TextBlockControl0 to something of your own choice so you can see it against the canvas.

  3. With the same control selected, select Copy from the toolbar and then Paste.

  4. Again, select Copy and then Paste. You should now have three TextBlockControl objects on the canvas: TextBlockControl0, TextBlockControl1, and TextBlockControl2. These controls will be used to display the page number text.

  5. Select the TextBlockControl0 and in the Text property type, "=Page". This will cause the report to display the current page.

  6. Select the TextBlockControl1 and in the Text property type, "of".

  7. Select the TextBlockControl2 and in the Text property type, "=Pages". This will cause the report to display the total number of pages. Note that when typing expressions you must type them

  8. Position these controls so that they line up reading from left to right: =Page of =Pages.

  9. Set the temporary background color back to white for these three controls.

  10. Set the Width property for each of these to 10. It's alright if the expression text appears cut off. The width only needs to be long enough to fit a three digit number.

  11. Click the SelectorControl icon [image], and drag a box around all three controls to select them.

  12. Click the Same Height icon [image] from the main toolbar to make all three controls the same size.

  13. Click the Align Top icon [image] from the main toolbar to align the controls' edges.

  14. Click the Group icon [image] from the main toolbar to group the objects together. With the items grouped you can now click and drag all three objects together as if they were one. Position them near the right and bottom edge of the canvas.

  15. Add a fourth TextBlockControl [image], and in the Text property type, "DATE:". Use these properties to position it in the near the right edge of the canvas somewhat above and to the left of the =Page of =Pages grouping.

    • Left: 670.00

    • Top: 1030.00

    • Width: 35.00

    • Height: 15.00

    • FontWeight: Bold

  16. Copy and paste TextBoxControl4. TextBoxControl5 is added onto the canvas.

  17. Select TextBoxControl5, and in the Text property type the expression, "=DATE". Use these properties to position it to the right of the "DATE:" text.

    • Left: 710.00

    • Width: 80.00

  16. Select both TextBoxControl4 and TextBoxControl5 and align their top edges.

  17. Add a final TextBlockControl [image], and in the Text property type, "NOTES:". Use these properties to position it on the left side of the canvas near the bottom:

    • Left: 40.00

    • Top: 1030.00

    • Width: 40.00

    • Height: 20.00

    • FontWeight: Bold

  18. Click the TextBoxControl icon [image] and drag a box to the right of the "NOTES:" object. Size, position, and format it using these properties:

    • Left: 85.00

    • Top: 1030.00

    • TextWrapping: Wrap

    • Width: 520.00

    • Height: 85.00

    • Background: WhiteSmoke

  19. Add a new RectangleControl [image] and set these properties so that it surrounds the objects located in the remaining space at the bottom edge of the template. Use these properties to do this:

    • Left of 30.00

    • Top of 1027.00

    • BorderThickness of 2.00,2.00,2.00,2.00

    • BorderBrush of Black

    • Width of 763

    • Height of 95

  17. Save the template.

This finishes the footer and the template. The footer should look something like this:

Finished Footer

Now that you have created the footer, you have learned to copy and paste controls, to align and group them. You've also seen that expressions can work in the TextBlockControl as well as in the GridControl. In the next step you will test the template inside Datapage+.

Next Step


Step 5: Test the Final Template

Previous Step

In this step you will load the template inside the Text tab of Datapage+ and add some comments into the bottom of the report.

  1. Start Datapage+.

  2. Login to the demo.mdf database that ships with PC-DMIS and access the DEMO part.

  3. Apply the part data to the Text tab. A default text template displays and configures the data.

  4. From the Text Report icon [image] choose a transaction date from the Measurement Report submenu.

  5. Select the Template Selection icon [image]. An Open dialog appears.

  6. Select CustomTextReport.TxtRpt from the TemplateRpts subdirectory, and click Open.

  7. The data is formatted using the new template. Notice that the expressions are displaying the proper information and notes can be typed into the available text box.

The Measurement Report Using the Custom Template

This concludes the tutorial. You should now have the basics needed to create your own templates using Template Builder. Consult the other topics in this help file for more specific information on the various controls and other toolbar icons.

Back to "Getting Started with Template Builder"


Expressions

About Expressions

Adding Expressions to Supported Controls

Expressions List


About Expressions

Expressions are special commands that you place inside of supporting controls to pull specific data from Datapage+ or the database into the report. Expressions always start with an equals sign (=) and are followed by the expression name. For example, if you wanted to display the part's name inside your report, your template must have a control that uses the =PartName expression.

Sample expressions in a template

These topics are covered in this section:

  • Adding Expression to Supported Controls

  • Expressions List


Adding Expression to Supported Controls

Adding Expressions to Supported Controls

For report templates, the following lists the controls that take expressions and how to add expressions to those controls:

Supported Controls

Instructions

GridControl

  1. Add the GridControl to the template. Set the LabelType property so that it matches the context in which the expression will be used. For example, if you'll be using the expressions in the template's header or footer, you would select HeaderAndFooter.

  2. Choose the SelectorControl.

  3. Double-click to activate the GridControl and then click within a cell until it becomes selected with a blue highlight.

  4. Type the expression into that cell. You can also right-click on the grid cell and select the expression from the Cell expression list in the Grid Property dialog box. The Expression Editor appears. Use this dialog box to select and add parameters to the expression (see the dialog box description below). See the "Expressions List" topic for a list of available expressions and their descriptions.

TextBlockControl

Select the control and then type the expression into the Text property. Alternately, you can right-click on the control and choose the Add Expression option. A small Select Expressions dialog appears, allowing you to choose and add an expression to the control.

Expression Editor Dialog Box Description

Expression Editor

  1. The Expression box displays a preview of what the selected expression will look like with the chosen parameters.

  2. The box next to the Go button lets you search for an expression.

  3. The Go button searches for the expression typed in the box and returns the expression, selecting it and displaying its parameters.

  4. Selecting an item from this drop down list shows the expressions assigned to that category. Available categories are: General, ChartType, FeatureRelative, and AxisParameter.

  5. This list displays the expressions (or functions) assigned to the selected category. Selecting an item shows any parameters in the bottom half of the dialog box.

  6. This box displays any special instructions to use the expression.

  7. This lower half of the dialog contains drop down lists allowing you to select values for the different parameters used by the expression. As you select items in these lists, the preview of the expression appears in the Expression box. Parameters are described in the "Expressions List" topic.


Expressions List

This topic lists the available expressions and descriptions of each expression. It also shows what LabelType you need to select and category in the Expression Editor dialog box for the expression to appear. For information on this dialog box, see the "Adding Expression to the GridControl" topic.

Some expressions take one or more parameters. Parameters are values you pass into the function or expression. The expression then uses the parameter to determine what final value the expression should return.

Expression Name

Required LabelType Property

Category

Description

=PartName

HeaderAndFooter
Feature
Dimension
Variable

General

This displays the part's name, taken from the database.

=Operator

HeaderAndFooter
Feature
Dimension
Variable

General

This displays the operator displayed in the Transaction list in Datapage+. If the list contains more than one operator, it displays the operator from the first transaction in the list.

=Date

HeaderAndFooter
Feature
Dimension
Variable

General

This displays today's date, taken from your computer system.

=Page

HeaderAndFooter
Feature
Dimension
Variable

General

This displays the current page number in the report.

=Pages

HeaderAndFooter
Feature
Dimension
Variable

General

This displays the total number of pages in the report.

=StartDate

HeaderAndFooter
Feature
Dimension
Variable

General

This displays the start date in a range of transactions.

=EndDate

HeaderAndFooter
Feature
Dimension
Variable

General

This displays the end date in a range of transactions.

=SelectedTransNumber

HeaderAndFooter
Feature
Dimension
Variable

General

This displays the number of transactions.

=TextReportType

HeaderAndFooter
Feature
Dimension
Variable

General

This displays the type of text report used in the Text tab.

=VariableSetName

HeaderAndFooter
Feature
Dimension
Variable

General

This displays the name of the currently active variable set. If you are not using a variable set, nothing will be displayed.

=QueryName

HeaderAndFooter
Feature
Dimension
Variable

General

This displays the name of the currently active query. If you are not using a query, nothing will be displayed.

=GetTraceValue(param1, param2)

HeaderAndFooter
Variable
Feature
Dimension

FeatureRelative

This displays a specified trace field value based on the defined parameters. This expression takes two parameters:

Parameter 1:

This defines the transaction to pull the information from out of those selected. A value of 1 means the most recent transaction, and a 10 means the 10th most recent transaction.

Parameter 2:

This takes the index number for the trace name (or trace column) from which parameter 1 will be used to get a specific value.

For example, in Datapage+ if you hover your mouse over the Transactions list in the side bar, a popup will appear showing each trace names separated by a semicolon character. These are the trace names for the trace columns. Starting from left and moving to the right, the index values would be 0, 1, 2, 3, 4 and so on.

Example Trace Names OPERATOR, CAVITY, and MOLD and their respective index values of 0, 1, and 2

=GetFeatureValue(param1, param2)

Variable
Feature
Dimension

FeatureRelative

This displays the value of the items specified in the second parameter. This expression takes two parameters:

Parameter 1: This defines the variable to use in the calculation. It can take on of these values:

  • Null - This is always Null if the LabelType property is Variable. Null returns the value for the current variable if you're using a repeated row, otherwise it returns the first variable of the feature or dimension.

  • If it is Feature or Dimension, this parameter specifies an axis: (X, Y, Z, D, A, M, T, S, PD, RT, RS, Prad, Pang, L, H, and V).

Parameter 2: This defines the feature value to display. This parameter can be one of the following:

+T - This shows the feature's plus tolerance.

-T - This shows the feature's minus tolerance.

±T - This shows both the plus and the minus tolerance.

Dev - This shows the feature's deviation.

Nominal - This shows the feature's nominal value.

=GetStatisticValue(param1,param2)

Variable
Feature
Dimension

FeatureRelative

This displays the specified statistical value defined in Parameter 2. This expression takes two parameters:

Parameter 1: This defines the variable to use in the calculation. It can take on of these values:

  • Null - This is always Null if the LabelType property is Variable. Null returns the value for the current variable if you're using a repeated row, otherwise it returns the first variable of the feature or dimension.

  • If it is Feature or Dimension, this parameter specifies an axis: (X, Y, Z, D, A, M, T, S, PD, RT, RS, Prad, Pang, L, H, and V).

Parameter 2:

This is the statistical value. These are the same values defined in the "Description of Column Names" topic where the Detailed Mode of Feature Monitor tab is discussed.

=GetTransactionValue(param1, param2, param3)

Variable
Feature
Dimension

FeatureRelative

This displays the specified transaction value. This expression takes three parameters:

Parameter 1: This defines the variable to use in the calculation. It can take on of these values:

  • Null - This is always Null if the LabelType property is Variable. Null returns the value for the current variable if you're using a repeated row, otherwise it returns the first variable of the feature or dimension.

  • If it is Feature or Dimension, this parameter specifies an axis: (X, Y, Z, D, A, M, T, S, PD, RT, RS, Prad, Pang, L, H, and V).

Parameter 2:

This defines the transaction to pull the information from out of those currently selected. A value of 1 means the most recent transaction, and a 10 means the 10th most recent transaction.

Parameter 3:

Measure value - This displays the measured value of the transaction.

MeasureDev - This displays the deviation of the measured value.

MeasureDate - This displays the date of the measurement.

=GetObjectName(param1)

Variable
Feature
Dimension

FeatureRelative

This displays an object's name. This expression takes one parameter.

The type of object whose name it displays depends on a single parameter you specify in the parentheses. The parameter can be one of these values:

DimensionName - This displays the dimension name: for example, something like LOC1.

FeatureName - This displays the feature name: for example, something like CIR1.

FeatureVariableName - This displays the feature variable name: for example, something like CIR1.X.

=GetMaxOutTolerance(param1,param2)

Variable Feature Dimension

FeatureRelative

This displays either the max out of tolerance value or the transaction name for a variable. If no values are out of tolerance, nothing is displayed. This expression takes two parameters:

Parameter 1: This defines the variable to use in the calculation. It can take on of these values:

  • Null - This is always Null if the LabelType property is Variable. Null returns the value for the current variable if you're using a repeated row, otherwise it returns the first variable of the feature or dimension.

  • If it is Feature or Dimension, this parameter specifies an axis: (X, Y, Z, D, A, M, T, S, PD, RT, RS, Prad, Pang, L, H, and V).

Parameter 2:

Transaction - This displays the transaction name with the feature, variable, or dimension that has the most out of tolerance value from the list of selected transactions.

OutTolerance value - This displays the maximum out of tolerance value.

=ExpanderCell()

Variable
Feature
Dimension

FeatureRelative

This expression corresponds to the parameter selection in the Label Settings dialog box. Datapage+ will show the label with the selected statistic parameters in the Chart Mode statistics list if you use this expression. See "Label Settings".


Controls

About Controls

TextBoxControl

TextBlockControl

UserTextControl

GridLayoutControl

GridControl

RectangleControl

ImageControl

ChartObjControl

CadObjControl

TextObjControl

ColorMapControl


About Controls

Controls once added to a template determine what information appears and how that information is positioned in your final report. Some controls act as containers for information taken from Datapage+ or other sources (such as ChartObjControl, CadObjControl, TextObjControl, ImageControl, GridControl). Other controls provide organization to your report (such as the RectangleControl and GridLayoutControl). The various text controls let you send textual information from your template or collect it from the user.

Adding and Selecting Controls

To add a control, click a control icon from the Controls toolbar and then drag a box to add it to the main canvas. Once a control is added, you can then select that control by clicking on it from the canvas or by selecting it from the Controls list. Once selected, small handles appear around the control. You can reposition the control and modify it using the Properties Pane. See "The Properties Pane".

Selecting Multiple Controls

You can select multiple objects in one of two ways:

  • Click on the SelectorControl object and drag a box around the desired objects.

  • Press and hold either the CTRL or SHIFT keys while clicking on multiple objects.

Available Controls

The following controls are available from the Controls toolbar:

  • SelectorControl

  • TextBoxControl

  • TextBlockControl

  • UserTextControl

  • GridLayoutControl

  • GridControl

  • RectangleControl

  • ImageControl

  • ChartObjControl

  • CadObjControl

  • TextObjControl

  • ColorMapControl


Selector Control

The SelectorControl is not a true control since it is not an object that you can put on the canvas. It is merely a tool to select other controls that are on the canvas. Most of the time you won't need to use this as it only is needed to select multiple objects at once by dragging box around them.


TextBoxControl

This control inserts a text box into your report. You can use this text box to send text strings or expressions to your reports. The user can also type into this text box to edit the string.

Properties

The following properties are available for this control.

Left - This determines the position of the control from the left side of the canvas.

Top - This determines the position of the control from the top side of the canvas.

HorizontalContent - This sets the alignment of the content with respect to the left and right boundaries of the control. Left aligns the content horizontally to the left edge of the control; Center aligns the content to the center of the control's left and right edges; Right aligns the content to the right edge of the control; and Stretch stretches the content so that it reaches both the left and right edges of the control.

VerticalContent - This sets the alignment of the content with respect to the top and bottom boundaries of the control. Top aligns the content vertically to the top edge of the control; Center aligns the content to the center of the control's top and bottom edges; Bottom aligns the content to the bottom edge of the control; and Stretch stretches the content so that it reaches both the top and bottom edges of the control.

TextWrapping - This determines whether or not the text wraps to the next line when it reaches the control's boundary. NoWrap: No wrapping takes place. Wrap: Wrapping takes place when it reaches the control's boundary. WrapWithOverflow: Wrapping occurs if the text overflows the controls width. However, a line of text may overflow the control's width if the line breaking algorithm cannot determine a break opportunity, such as a very long word.

Text - This determines the string of text to display or the expression to use.

Name - This provides the control with a unique name. If you have more than one control of the same type on the canvas, the software will append a number to the name of the control to make it unique. You can change this to whatever name you want as long as it remains unique from other controls.

Width - This sets the width of the control. If you click the Auto icon [image], the width expands or shrinks to match the width used by the canvas.

Height - This sets the height of the control. If you click the Auto icon [image], the height expands or shrinks to match the height used by the canvas.

BorderThickness - This sets the thickness of the control's border. You will see a set of four numbers (1.00,1.00,1.00,1.00). Each number of 1.00 represents a side of the border. So the first 1.00 represents the left side, the second represents the top side, the third represents the right side, and the fourth represents the bottom side. The larger the numbers are, the thicker the border is drawn. For example, setting these to 5.00,5.00,5.00,5.00 will draw a border around the control with a thickness of 5 pixels. Setting these to 0.00,0.00,0.00,0.00 will remove the border completely.

Background - This determines the control's background color. To change the color simply select a new color from the list or click the Brush icon [image] to the right to define a custom color.

Foreground - This determines the control's foreground (or text) color. To change the color simply select a new color from the list or click the Brush icon [image] to the right to define a custom color.

FontFamily - This determines the typeface applied to the text used by the control.

FontSize - This determines the size of the text.

FontStyle - This determines the style of font (italics, normal, oblique).

FontWeight - This determines how bold the text is.


TextBlockControl

This control sizes the text to fit its constraints, unlike the TextBox control which is either cut off or wraps when a line of text comes to the boundary. This control lets you display either text or expressions.

Properties

The following properties are available for this control.

Left - This determines the position of the control from the left side of the canvas.

Top - This determines the position of the control from the top side of the canvas.

Text - This determines the string of text to display or the expression to use.

FontFamily - This determines the typeface applied to the text used by the control.

FontStyle - This determines the style of font (italics, normal, oblique).

FontWeight - This determines how bold the text is.

FontSize - This determines the size of the text.

Foreground - This determines the control's foreground (or text) color. To change the color simply select a new color from the list or click the Brush icon [image] to the right to define a custom color.

Background - This determines the control's background color. To change the color simply select a new color from the list or click the Brush icon [image] to the right to define a custom color.

Name - This provides the control with a unique name. If you have more than one control of the same type on the canvas, the software will append a number to the name of the control to make it unique. You can change this to whatever name you want as long as it remains unique from other controls.

Width - This sets the width of the control. If you click the Auto icon [image], the width expands or shrinks to match the width used by the canvas.

Height - This sets the height of the control. If you click the Auto icon [image], the height expands or shrinks to match the height used by the canvas.


UserTextControl

This type of control allows users to input text into this control directly from within Datapage+ or the ReportViewer. In addition, the user can also size and reposition this control directly within the report.

Properties

The following properties are available for this control.

Left - This determines the position of the control from the left side of the canvas.

Top - This determines the position of the control from the top side of the canvas.

HorizontalContent - This sets the alignment of the content with respect to the left and right boundaries of the control. Left aligns the content horizontally to the left edge of the control; Center aligns the content to the center of the control's left and right edges; Right aligns the content to the right edge of the control; and Stretch stretches the content so that it reaches both the left and right edges of the control.

VerticalContent - This sets the alignment of the content with respect to the top and bottom boundaries of the control. Top aligns the content vertically to the top edge of the control; Center aligns the content to the center of the control's top and bottom edges; Bottom aligns the content to the bottom edge of the control; and Stretch stretches the content so that it reaches both the top and bottom edges of the control.

Text - This determines the string of text to display on the report. By default it says "Enter Something Here...".

Name - This provides the control with a unique name. If you have more than one control of the same type on the canvas, the software will append a number to the name of the control to make it unique. You can change this to whatever name you want as long as it remains unique from other controls.

Width - This sets the width of the control. If you click the Auto icon [image], the width expands or shrinks to match the width used by the canvas.

Height - This sets the height of the control. If you click the Auto icon [image], the height expands or shrinks to match the height used by the canvas.

BorderThickness - This sets the thickness of the control's border. You will see a set of four numbers (1.00,1.00,1.00,1.00). Each number of 1.00 represents a side of the border. So the first 1.00 represents the left side, the second represents the top side, the third represents the right side, and the fourth represents the bottom side. The larger the numbers are, the thicker the border is drawn. For example, setting these to 5.00,5.00,5.00,5.00 will draw a border around the control with a thickness of 5 pixels. Setting these to 0.00,0.00,0.00,0.00 will remove the border completely.

Background - This determines the control's background color. To change the color simply select a new color from the list or click the Brush icon [image] to the right to define a custom color.

Foreground - This determines the control's foreground (or text) color. To change the color simply select a new color from the list or click the Brush icon [image] to the right to define a custom color.

FontFamily - This determines the typeface applied to the text used by the control.

FontSize - This determines the size of the text.

FontStyle - This determines the style of font (italics, normal, oblique).

FontWeight - This determines how bold the text is.


GridLayoutControl

This control helps you lay out various controls on the page by providing you with a visible grid that can accept other controls. By default the grid lines are turned off. Mark the ShowGridLines check box to display them. To adjust rows or columns, double-click to activate the control and then drag the column or row lines as desired.

To use this control:

  1. Add a GridLayoutControl onto the template.

  2. Select a control already on the template's canvas.

  3. Press the SHIFT key and drag the control on top of the GridLayoutControl. The border color of GridLayoutControl change to red to indicate that the control is ready to be dropped.

  4. Release the mouse button to drop the control onto the GridLayoutControl.

Properties

The following properties are available for this control.

Left - This determines the position of the control from the left side of the canvas.

Top - This determines the position of the control from the top side of the canvas.

ShowGridLines - This check box makes any grid lines visible inside of the control.

ColumnDefinitions - The ... button lets you add columns to this control. Clicking it displays a Collection Editor dialog box which lists columns as column definitions. By default it always lists [0]ColumnDefinition. To add a new column to the right of all other columns, click Add Item. To insert a new column to the left of the selected column, click Insert Item. The column is inserted into the control and listed in the dialog box. To delete a column, select the desired column definition from the dialog box and click Delete Item.

Collection Editor dialog box

RowDefinitions - The ... button lets you add rows to this control. Clicking it displays a Collection Editor dialog box which lists the rows as row definitions. By default it always lists [0]RowDefinition. To add a new row to the bottom of all other rows, click Add Item. To insert a new row above the selected row, click Insert Item. The row is inserted into the control and listed in the dialog box. To delete a row, select the desired row definition from the dialog box and click Delete Item.

Name - This provides the control with a unique name. If you have more than one control of the same type on the canvas, the software will append a number to the name of the control to make it unique. You can change this to whatever name you want as long as it remains unique from other controls.

Width - This sets the width of the control. If you click the Auto icon [image], the width expands or shrinks to match the width used by the canvas.

Height - This sets the height of the control. If you click the Auto icon [image], the height expands or shrinks to match the height used by the canvas.


GridControl

GridControl (TemplateBuilder)

This control inserts a customizable grid of columns and rows into your template. This unique control is more than just a standard table though. In fact, you can program the individual cells, rows, or columns using expressions to display specific information from your database. See "Expressions".

As with the other controls, you can easily resize and move this object to a new location. When you resize this object, be aware that the software dynamically sizes the columns and rows to fit the object's new size.

Accessing the Grid Property Dialog Box

Once you insert a GridControl, select it, double-click on it to activate it, click in a cell, and then right-click to display the Grid Property dialog box. The Cell tab of this dialog box gives you powerful formatting and editing abilities that let you program each grid cell to your individual specifications.

Grid Property Dialog Box - Cell Tab

The Grid Property dialog box - Cell Tab

Cell type - Lets you configure what you will insert into the specific cell. The options are:

  • Text - This lets you type straight text or an expression command into the Cell Expression box of the Expression Editor dialog box. The evaluated expression or the straight text appears in the cell.

  • Image - This inserts an image into the cell. You can select it using the Select button.

  • Expression - This box lets you type an expression into the cell. Datapage+ evaluates the expression when it uses the template to display the actual report data. Use the Cell expression list for available expressions.

Select - If Cell type is set to Image, this button lets you choose an image to display inside of the selected cell. If Cell type is set to Expression, this button lets you choose the expression to insert into the cell.

Enable edit cell - If Cell type is set to Text, you can mark or clear this box to determine whether or not the cell can be edited when the template is used in the report.

Cell expression - This list lets you choose an expression to use in the cell. This expression will be used if Cell type is set to Expression. Also, see "Expressions" for descriptions of the available expressions.

Cell height and Cell width - These boxes let you define the cell's height and width in pixels. Note that if you modify a height, all cells in that row are modified. If you change the width, all cells in that column are modified. The two Auto buttons automatically size the cell vertically or horizontally to fit the text.

Merge Cells- This button merges multiple cells together into one cell.

Unmerge Cells - This button splits previously merged cells into their original and previous unmerged state.

Cell justification - These buttons let you set the alignment of the text within the cell, either vertically or horizontally. If horizontal, your can align the text to the left, the center, or the right of the cell. If vertical, you can align the text to the top, the middle, or the bottom.

Horizontal Alignment Buttons

  • Left - Aligns the text with the left side of the cell.

  • Center - Aligns the text horizontally in the center of the cell.

  • Right - Aligns the text with the right side of the cell.

Vertical Alignment Buttons

  • Top - Aligns the text with the top of the cell.

  • Middle - Aligns the text vertically in the middle of the cell.

  • Bottom - Aligns the text with the bottom of the cell.

Font Size - This button accesses the Font Chooser dialog box. You can use this dialog box to modify the cell's font, font style, font weight, font size, affects, as well as change its font color. Any text in that cell is then modified to use these font properties.

Font Chooser dialog box

Background Color - This button defines the background color for the cell. It opens a Color dialog box, allowing you to choose a color.

Text Color - This button defines the text color for the cell. It opens a Color dialog box, allowing you to choose a color.

Properties

The following properties are available for this control.

Left - This determines the position of the control from the left side of the canvas.

Top - This determines the position of the control from the top side of the canvas.

OutsideFrame - This determines the type of line used as the grid's border. The options are Thick, Thin, and None.

InsideFrame - This determines the type of line used for the grid's inside lines. The options are Thick, Thin, and None.

FrameColor - The color box shows the current color used for the grid's lines. The button to the right shows the Color Selection dialog box, allowing you to change the grid's line.

LabelType - Since the GridControl can be used in different contexts, this property defines that context for this control. For example, you can use the GridControl in the Template Builder with a Header and Footer; or you can use the GridControl inside a label template to display information for a specific data source available on the drop-down list in Datapage+'s side bar: Feature_Variable, Dimension_Variable, Feature, and Dimension.

Data Sources in Datapage+

The LabelType property contains these options: HeaderAndFooter, Variable, Feature, and Dimension. You must choose the item that corresponds to the source of the data being sent to the GridControl. For example, if your GridControl will be in a header or footer of a report template, then choose HeaderAndFooter. If it will be used in a label template to display information from the Feature_Variable or Dimension_Variable data source, choose Variable. By default, this is set to HeaderAndFooter automatically when using the Template Builder. It is set to Variable when creating custom labels.

IsTransparent - If you mark this check box, the label's background will be transparent. If you clear this check box, the label's background will be white.

ColumnDefinitions - The ... button lets you add columns to this control. Clicking it displays a Collection Editor dialog box which lists columns as column definitions. By default it always lists [0]ColumnDefinition. To add a new column to the right of all other columns, click Add Item. To insert a new column to the left of the selected column, click Insert Item. The column is inserted into the control and listed in the dialog box. To delete a column, select the desired column definition from the dialog box and click Delete Item.

Collection Editor dialog box

RowDefinitions - The ... button lets you add rows to this control. Clicking it displays a Collection Editor dialog box which lists the rows as row definitions. By default it always lists [0]RowDefinition. To add a new row to the bottom of all other rows, click Add Item. To insert a new row above the selected row, click Insert Item. The row is inserted into the control and listed in the dialog box. To delete a row, select the desired row definition from the dialog box and click Delete Item.

Name - This provides the control with a unique name. If you have more than one control of the same type on the canvas, the software will append a number to the name of the control to make it unique. You can change this to whatever name you want as long as it remains unique from other controls.

Width - This sets the width of the control. If you click the Auto icon [image], the width expands or shrinks to match the width used by the canvas.

Height - This sets the height of the control. If you click the Auto icon [image], the height expands or shrinks to match the height used by the canvas.


RectangleControl

This control object inserts a rectangular border into the template.

Properties

The following properties are available for this control.

Left - This determines the position of the control from the left side of the canvas.

Top - This determines the position of the control from the top side of the canvas.

BorderThickness - This sets the thickness of the control's border. You will see a set of four numbers (1.00,1.00,1.00,1.00). Each number of 1.00 represents a side of the border. So the first 1.00 represents the left side, the second represents the top side, the third represents the right side, and the fourth represents the bottom side. The larger the numbers are, the thicker the border is drawn. For example, setting these to 5.00,5.00,5.00,5.00 will draw a border around the control with a thickness of 5 pixels. Setting these to 0.00,0.00,0.00,0.00 will remove the border completely.

BorderBrush - This determines the control's border color. To change the color simply select a new color from the list or click the Brush icon [image] to the right to define a custom color.

Background - This determines the control's background color. To change the color simply select a new color from the list or click the Brush icon [image] to the right to define a custom color.

Name - This provides the control with a unique name. If you have more than one control of the same type on the canvas, the software will append a number to the name of the control to make it unique. You can change this to whatever name you want as long as it remains unique from other controls.

Width - This sets the width of the control. If you click the Auto icon [image], the width expands or shrinks to match the width used by the canvas.

Height - This sets the height of the control. If you click the Auto icon [image], the height expands or shrinks to match the height used by the canvas.


ImageControl

This control lets you insert an image into your template. The control acts as a container for the specified image.

Properties

The following properties are available for this control.

Left - This determines the position of the control from the left side of the canvas.

Top - This determines the position of the control from the top side of the canvas.

Source - This field determines the complete file pathway to the image. You can either type the pathway or browse to it using the ... button. A sample pathway would look something like this:
file:///C:/Users/John/Pictures/picture.jpg

Stretch - This determines whether or not the image is stretched to match the control's size. None: No stretching occurs. Fill: The image stretches to fill the control's size without regard to image distortion. Uniform: The image stretches to fill the control's size, keeping the same height to width ratio so that distortion does not occur. Once the image touches one of the edges, it stops trying to fill the control. UniformToFill: This acts like Uniform but it sizes the image to fill up the entire control. This may lead to part of the image being clipped.

StretchDirection - This determines the stretch direction. UpOnly: The image enlarges the image if it smaller than the size of the control. DownOnly: If the image is larger than the control, it scales down to the size of the control. Both: The image scales either up or down to match the control's size, similar to normal uniform stretch.

Name - This provides the control with a unique name. If you have more than one control of the same type on the canvas, the software will append a number to the name of the control to make it unique. You can change this to whatever name you want as long as it remains unique from other controls.

Width - This sets the width of the control. If you click the Auto icon [image], the width expands or shrinks to match the width used by the canvas.

Height - This sets the height of the control. If you click the Auto icon [image], the height expands or shrinks to match the height used by the canvas.


ChartObjControl

This special control is one of three report type controls. This control determines that your template will be a chart type template; as such, it will only display the part's data in a chart format. The specific chart type used is controlled using the Chart's tab inside Datapage+.

When you save the template with this control, Template Builder requires that it be saved as a ".ChartRpt" file.

This report type cannot coexist on the same template as the other report type controls of CadObjControl and TextObjControl.

Properties

The following properties are available for this control.

Left - This determines the position of the control from the left side of the canvas.

Top - This determines the position of the control from the top side of the canvas.

Name - This provides the control with a unique name. If you have more than one control of the same type on the canvas, the software will append a number to the name of the control to make it unique. You can change this to whatever name you want as long as it remains unique from other controls.

Width - This sets the width of the control. If you click the Auto icon [image], the width expands or shrinks to match the width used by the canvas.

Height - This sets the height of the control. If you click the Auto icon [image], the height expands or shrinks to match the height used by the canvas.


CadObjControl

This special control is one of three report type controls. This control determines that your template will be a CAD object type template; as such, it will only display the part's data in a format comprised of the part images and labels containing chart data. The specific chart data used in the labels and other CAD elements are controlled using the CAD tab inside Datapage+.

When you save the template with this control, Template Builder requires that it be saved as a ".CadRpt" file.

Note: This report type cannot coexist on the same template as the other report type controls of ChartObjControl and TextObjControl.

Properties

The following properties are available for this control.

Left - This determines the position of the control from the left side of the canvas.

Top - This determines the position of the control from the top side of the canvas.

Name - This provides the control with a unique name. If you have more than one control of the same type on the canvas, the software will append a number to the name of the control to make it unique. You can change this to whatever name you want as long as it remains unique from other controls.

Width - This sets the width of the control. If you click the Auto icon [image], the width expands or shrinks to match the width used by the canvas.

Height - This sets the height of the control. If you click the Auto icon [image], the height expands or shrinks to match the height used by the canvas.


TextObjControl

This special control is one of three report type controls. This control determines that your template will be a text type template; as such, it will only display the part's data in a textual format. The specific text format used is controlled using the Text tab inside Datapage+.

When you save the template with this control, Template Builder requires that it be saved as a ".TextRpt" file.

Note: This report type cannot coexist on the same template as the other report type controls of ChartObjControl and CadObjControl.

Properties

The following properties are available for this control.

Left - This determines the position of the control from the left side of the canvas.

Top - This determines the position of the control from the top side of the canvas.

Name - This provides the control with a unique name. If you have more than one control of the same type on the canvas, the software will append a number to the name of the control to make it unique. You can change this to whatever name you want as long as it remains unique from other controls.

Width - This sets the width of the control. If you click the Auto icon [image], the width expands or shrinks to match the width used by the canvas.

Height - This sets the height of the control. If you click the Auto icon [image], the height expands or shrinks to match the height used by the canvas.


ColorMapControl

This control inserts a color map into the template. This visual map corresponds to the color-coded tolerance zones used when visualizing features, feature_variables, and the like inside Datapage+. By default, Datapage+ uses a single tolerance zone (green), bounded by negative (red) and positive (blue) out of tolerance zones. But the number of tolerance zones and the colors used for them can be modified inside Datapage+. As this occurs this color map as used on the reports will change to match.

Properties

The following properties are available for this control.

Left - This determines the position of the control from the left side of the canvas.

Top - This determines the position of the control from the top side of the canvas.

FontSize - This determines the size of the text.

Name - This provides the control with a unique name. If you have more than one control of the same type on the canvas, the software will append a number to the name of the control to make it unique. You can change this to whatever name you want as long as it remains unique from other controls.

Width - This sets the width of the control. If you click the Auto icon [image], the width expands or shrinks to match the width used by the canvas.

Height - This sets the height of the control. If you click the Auto icon [image], the height expands or shrinks to match the height used by the canvas.


ASCIIMathML sample page

ASCIIMathML.js sample page

Use auto-math-recognize mode (amath here x^2 and text is mixed endamath) or surround ASCIIMath formulas with left-quotes: `sum_(i=1)^n i=(n(n+1))/2` or LaTeX formulas with \$-signs $\int_0^{\pi/2} \sin x\,dx=1$.

And here is a simple graph: agraph plot(sin(x)) endagraph followed by a more elaborate graph (try double-clicking it, also while holding down shift or alt) agraph width=300; height=200; xmin=-5; xmax=5; xscl=1; plot((x-2)*(x-1)*x*(x+1)*(x+2)/2,-2.5,2.5); endagraph

Note: this page uses a relative link to ASCIIMathML.js, so the script should be in the same folder as this sample file.