Using the ReportViewer

About the ReportViewer

The ReportViewer Toolbar

Working with Reports


About the ReportViewer

About the ReportViewer Application

ReportViewer Application Showing a Sample Report

The ReportViewer Application is a simple application useful for viewing and printing ReportViewer reports that have been saved from Datapage+.

Getting Started

The ReportViewer application is installed as part of a bundle installation with Datapage+. To launch ReportViewer simply double-click on the ReportViewer shortcut icon located within the Datapage+ program group.

Then click the Open icon from the ReportViewer toolbar and select a report to view its contents. By default, these reports are stored inside the Reports sub directory located where you installed Datapage+.

Once open, you can manipulate certain report elements prior to printing.

  • The ReportViewer Toolbar

  • Working with Reports


The ReportViewer Toolbar

  1. Open: This opens an existing .dpreport file into the ReportViewer. If you already have a report open in the ReportViewer it will be closed before opening the new report.

  2. Print: This opens up a standard Print dialog box, allowing you to send the contents of the report file to any printer devices you have installed.

  3. Page Up: This scrolls up a page on a multi-page report.

  4. Page Down: This scrolls down one page on a multi-page report.

  5. First Page: This scrolls to the first page on a multi-page report.

  6. Last Page: This scrolls to the last page on a multi-page report.

  7. Zoom In: This zooms in on a portion of the report. This is much like using a magnifying glass. The graphical lines and dots increase in size as you zoom in. This is for viewing purposes only inside of the Report Viewer. It does not affect your printout at all. Click 100% icon to reset the page to its default size.

  8. Zoom Out: This zooms out of your report. Pages get progressively smaller. Combined with the Two Pages icon, if you zoom out far enough, this can provide you with an overview of your entire report.

  9. 100%: This restores the displayed contents to the default zoom state which is the actual size of the report. This is useful after zooming in and out.

  10. Page Width: This constrains or expands the contents of the report's current page to fit the ReportViewer's width.

  11. Whole Page: This constrains or expands the contents of the report's current page to fit the ReportViewer's width and height.

  12. Two Pages: This displays two pages side by side in the ReportViewer. The pages will shrink or expand as needed to fit side by side within the current constraints of the ReportViewer window dimensions. Used with the Zoom Out icon, it can provide you with an overview of your entire report.


Working with Reports

Text reports are basic reports that don't contain charts or CAD objects and working with them in the ReportViewer is fairly self-explanatory. Reports with Chart and CAD objects require some explanation because some functionality exists allowing you to manipulate the report somewhat.

The following topics address this functionality:

  • Manipulating Chart Objects

  • Manipulating CAD Objects

  • Moving Labels

Note that these manipulations will carry over into your printed output.


Manipulating Chart Objects

Manipulating Charts

Here are some operations you can do when you work with charts in the ReportViewer application.

Chart Operation

Operation Description

Performing the Operation

Zoom in and out (traditional zoom)

This zooms in and out on a portion of the chart. This is more like using a magnifying glass. The graphical lines and dots increase in size as you zoom in.

This type of zoom does not affect the printout in anyway. It is mainly used for viewing purposes only.

To Zoom In:

Hold down CTRL and push your mouse's scroll wheel away from you. Depending on the chart type, the ReportViewer may take a little while to process the zoom request.

To Zoom Out:

Hold down CTRL and pull your mouse's scroll wheel toward you. Depending on the chart type, the ReportViewer may take a little while to process the zoom request.

You can also use the Zoom In or Zoom Out icons on the toolbar.

Zoom in and out on just one chart

This zooms in on one particular chart, causing it to fill the width of the screen. This helps increase visibility when you have a chart with many data points since it increases the distance between individual data points when the chart expands.

This type of zoom affects the printout. The printout includes the expanded chart.

Double-click on a chart to size the chart to fill the page. Double-click on it again to reset the chart to its default size.


Manipulating CAD Objects

Initially a CAD model on your report is inactive. You can easily pan, zoom, or rotate this cad model to better display desired portions of the CAD image once you activate the part image. There are two activation modes:

  • Activation Mode for Panning - To enter this mode, simply click once on the part image. Small square handles will appear around the part image, forming an activation box and indicating it is activated for panning.

  • Activation Mode for Zooming and Rotating - To enter this mode, simply double-click on the part image. Small square handles as well as a rectangular box will appear around the part image, forming an activation box and indicating it is activated for zooming and rotating.

To exit any of these activation modes, double-click outside of the part image on the white space.

Moving a CAD Image (Panning)

  1. Click once on the CAD image to activate it for panning.

  2. Drag the image to a new location in the tabbed window.

  3. Click on the white space once outside of the square handles to deactivate the image.

Another way to pan the image is to use the activation mode for rotating or zooming. Right-mouse click on the part image and drag it to a new location.

Zooming in and out on a CAD Image

  1. Double-click on the CAD image to activate it for zooming or rotating.

  2. Ensure the mouse is over the CAD image. Where your mouse is when you push or pull the mouse wheel is important. Datapage+ will center on that location for its zoom. If your mouse is not over the CAD image but is outside of the box around the image, it will cycle through pages instead.

    • To zoom out, push the mouse wheel away from you.

    • To zoom in, pull the mouse wheel towards you.

  3. Click on the white space once outside of the square handles to deactivate the image.

2D Rotating the CAD Image

  1. Double-click on the CAD image to activate it for zooming or rotating.

  2. Hold down the SHIFT key and then with the mouse pointer over the activation box, right-click and slowly drag the mouse. If the mouse pointer moves outside of the CAD image, rotation stops.

  3. Click on the white space once outside of the square handles to deactivate the image.

3D Rotating the CAD Image

  1. Double-click on the CAD image to activate it for zooming or rotating.

  2. Hold down the CTRL key and then with the mouse pointer over the activation box, right-click and slowly drag the mouse.

  3. The location of the mouse pointer indicates the point about which the image rotates.

  4. Click on the white space once outside of the square handles to deactivate the image.

If you ever need to reset a rotated image, while activated for rotating, right-click on the CAD image and choose from the shortcut menu one of the main axes to which the image should rotate. See "Using the CAD Image Shortcut Menu" below.

Using the CAD Image Shortcut Menu

  1. Double-click on the CAD image to activate it for zooming or rotating.

  2. Right-click on the CAD image.

  3. Select an item from the resulting shortcut menu to rotate the part to one of the listed axes, display the part in wire-frame or solid, or size the model to fit the model in the activation box

Menu Item

Description

X+

Rotates and displays the X+ view of the part.

X-

Rotates and displays the X- view of the part.

Y+

Rotates and displays the Y+ view of the part.

Y-

Rotates and displays the Y- view of the part.

Z+

Rotates and displays the Z+ view of the part.

Z-

Rotates and displays the Z- view of the part.

Wireframe

Displays the part image as a wireframe model.

Solid

Displays the part image as a solid model.

Fit (Ctrl + Z)

Zooms in and out, scaling the image to fit within the activation box.

Rotation Center (Alt + Mouse Left)

Changes the center of rotation for the part image. You can either press Alt + a left mouse click on the part image to set the new center of rotation, or select this menu item to display an input box that lets you set the center of rotation using XYZ coordinates.

2D Rotation Angle

Performs a one time 2D rotate using the angle in the box connected to the menu item.

Rotate with Main CAD

This determines whether or not Datapage+ rotates the selected CAD object with the same 3D rotation as the main CAD object.

A check box appears next to the menu item when you enter this rotation mode. While marked, whenever you rotate the main CAD, this CAD object will use the same rotation as the main CAD.

Keep Trihedron with Alignment

This determines whether or not Datapage+ positions and rotates the trihedron according to the part program's defined alignment.

If this is cleared, the trihedron will return to CAD model's original position.

Rearrange Labels Position

This resets the position of the labels around the CAD object to their default positions.


Moving Labels

You can move labels to a new location by first clicking on the label. Small square "handles" appear around the label indicating that you can change its position.

Simply drag the label with the mouse to it's new position.

You can reset labels to their default positions by activating the CAD object, right-clicking on it, and choosing Rearrange Labels Position.


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.

These topics are covered in this section:

  • Expressions List


Adding Expression to Supported Controls

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.


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.


Expressions

About Expressions

Expressions List


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".


GridControl

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".

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 -

Text 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.