Filtering Data

Filter Data at Designer

media_1447209233678.png

To improve performance, the Snap Design Surface displays only the first 20 data rows while the document layout is being designed.

To change the number of data rows displayed, specify the Editor Row Limit option, which is located in the List tab of the main toolbar.

Filter Data at Source

media_1447209241369.png

Filtering data at the data source level is useful when dealing with large data sources because it reduces data retrieval time, and thus speeds up document generation.

To filter data at the data source level, use the Query Designer.

Filter List Data

media_1447209250201.png

To select which data records to include into the document, click the Quick Filter command in the Field tab of the contextual Data Tools toolbar category.

In the invoked drop-down menu, select the required records and click OK to apply filtering.

media_1447209260641.png

To specify the filtering criteria for Snap list data, do the following.

Place the text cursor inside the Snap list that you wish to filter and click the Filter command in the List tab of the contextual Data Tools toolbar category.

media_1447209268488.png

In the invoked FilterString Editor, construct the required filter expression and click OK to apply filtering.

Filter Mail Merge Data

media_1447209279677.png

Switch to the Mail Merge tab of the contextual Data Tools toolbar category, and click the Filter command.

media_1447209288113.png

In the invoked FilterString Editor, construct the required expression and click OK to apply filtering.

media_1447209294981.png

To view the result, click the Finish & Merge button in the Mail Merge tab of the contextual Data Tools toolbar category, and select Print Preview… in the drop-down menu. In the invoked Export Range dialog, select All records and click OK.

media_1447209301636.png

Limiting Data while Designing

media_1447215172439.png

To properly handle incoming data, only a portion of data is shown during the real-time editing of a document.

This restriction does not apply to the document created for print preview, and a report requests all data records after it is set for publishing.

When a document is being edited, only the first 20 rows from each data column are shown by default.

To modify or disable this limit, click a list to select it, and in the Data Tools: List Toolbar tab, select the number of data rows in the Editor Row Limit combo box.

Mail Merge Usage

media_1447192296338.png

A document can be transformed into a mail merge template by enabling this mode for one of the connected data sources.

This can be done by right-clicking a data source in the Data Explorer and selecting Use for Mail Merge in the invoked context menu.

In the resulting document, the static content wraps around any inserted merge field. When merging a finished document, the static template is repeated with each record supplied by the corresponding merge field’s data source.

This is in contrast to creating a regular master-detail report, in which an inserted field instantly expands to list all of its data records within the document body.

Master Report: Merge Fields

media_1447192303461.png

When inserted from a hierarchical data source, fields that belong to its top level are attributed to the “master” section of a template.

To blend with the rest of the report content, the data from these merge fields is inserted as inline text.

Detail Report: Data Fields

media_1447192309729.png

Fields that belong to nested levels of a data source form part of the “detail” document section.

When inserted in a template, this data field is displayed as a list of rows representing the underlying data records.

In a document structure, this template is reproduced with each new occurrence of data rows belonging to the “master” section, to accompany it with the corresponding detail data.

Adding data fields that belong to the same hierarchical level results in creating columns in a document table. Snap tables support automatic summaries, sorting, grouping and filtering.

media_1447192320293.png

Quick filtering allows end-users to select data records by name.

In the following image, the ‘country’ field is selected. As a result, clicking the Quick Filter button displays a list of countries to select.

media_1447192326773.png

When simple record selection is not sufficient, you can easily create a complex expression using the Expression Filter dialog.

media_1447192338959.png

To the left of the navigation controls, you can invoke the Sort dialog box to specify the sort order of records based on any field (or sub-field in a master-detail report) in the data source.

 

 

media_1447192345482.png

To publish a report, you have the following options:

Send it to a printer;

Export it to a third-party document format (DOC, DOCX, RTF, ODT, HTML, PDF, etc.);

Display it on-screen in a Print Preview window.

After selecting one of these options, you can select the range of records to publish, as well as how each record should be separated.

Parameters

media_1447191539753.png

To invoke the Parameters dialog, right-click the Parameters node (or any of its sub-nodes) in the Data Explorer and select EditParameters in the invoked drop-down menu.

media_1447191552222.png

To invoke the Parameters dialog for a data source being edited with the Query Designer, click the Parameters button.

media_1447191559410.png

The Parameters dialog allows you to add and remove parameters using corresponding buttons.

Alternatively, you can add or remove a parameter by right-clicking the parameter in the Data Explorer and selecting the required action in the invoked drop-down menu.

Select the newly added parameter and specify its properties in the properties grid.

Be sure to specify the proper parameter type based on the parameter’s intended use.

media_1447191568913.png

To display a parameter’s value in a report, drag the parameter from the Field List and drop it onto the Design Surface.

media_1447191576547.png

To filter the document data at the data source level, do the following.

Invoke the Query Designer for the data source that you wish to filter.

In the Query Designer, click the Filter button to invoke the Filter Editor.

media_1447191585545.png

In the Filter Editor, construct an expression where the parameter’s value is used as a filtering criterion.

To access the parameter, click the icon on the right until it turns into a question mark.

Click OK to exit the dialog.

media_1447191603679.png

In a similar way, you can use the Filter Editor to filter the document data at the report level.

In this case, to invoke the Filter Editor, click the Filter button that resides on the List tab of the contextual Data Tools toolbar category.

Calculated Fields

media_1447192154004.png

In addition to standard data fields, parameters can be used in expressions for calculated fields.

The only difference is that the data field is inserted into the expression’s text using its name in [square brackets], while a parameter is inserted using the “Parameters.” prefix before its name.

Calculations

media_1447192196079.png

Use calculated fields to perform additional calculations on dynamic data and embed the results into a published document.

To create a calculated field and access its collection, invoke the context menu in the Data Explorer.

media_1447192203487.png

A calculated field’s expression can include conditional, date-time, mathematical and other formulas.

It can also evaluate the values of other calculated fields, data source fields and parameters.

media_1447192209758.png

The Calculation Expression is invoked by right-clicking a calculated field and choosing the Edit Expression… item in the invoked popup menu.

After a calculated field is inserted into a document, its value is evaluated each time the document is set to be published.

Query Designer

media_1447177647933.png

An option to invoke the Query Designer is provided on the last page of the Create Data Source wizard.

Select the “Open Query Designer after closing the wizard” option before clicking Finish.

media_1447177663864.png

To modify a relation assigned to a specific table, click its corresponding ellipsis button in the data source editor.

This invokes the Condition Editor, which allows you to include other tables in the new data relation and select the relation type (Inner join, Left outer join or Master-detail relation).

media_1447177672316.png

The Condition Editor is automatically invoked after adding a new table to a data model.

The Query Designer highlights the tables of an external data source that are related to the tables of a Snap data model by one or more primary keys.

To maintain the visibility of data columns in the Data Explorer, use the corresponding check boxes in a specific table’s column list.

media_1447177681206.png

In this list, the primary key columns display a ‘plus’ button, which invokes a list of related tables. Clicking a table in this list adds it to the data source.

media_1447177688428.png

To manually customize an SQL string, enable the Allow SQL Editing option. Switching to this mode disables the visual features of the Query Designer in favor of the specified SQL string value.

media_1447177697072.png

To assign a custom name to the selected data column, specify its Alias in the column list displayed under the Snap data source editor.

media_1447177704502.png

To specify the filter criteria that is applied to incoming data, click the Filter button, which invokes the FilterString Editor.

Adding Exterior DataSources

media_1447177128930.png

To invoke the wizard, click Add External Data Source in the File menu.

media_1447177150601.png

Alternatively, you can right-click an empty area in the Data Explorer and click Add Data Source in the invoked context menu.

media_1447177159078.png

On the first page, select the data source type and click Next.

The following steps assume that a Database is selected.

media_1447177165335.png

If a data connection has already been specified in the application, the next wizard page allows you to select whether to use one of the existing connections, or create a new one.

media_1447177171640.png

When creating a new connection, you can specify the connection parameters on the next page.

On this page, you can define a custom connection string, or select from the following supported data source types.

Microsoft SQL Server
Microsoft Access 97
Microsoft Access 2007
Oracle
XML File
SAP Sybase Advantage
SAP Sybase ASE
IBM DB2
Firebird
MySQL
Pervasive PSQL
PostgreSQL
VistaDB
Microsoft SQL Server CE
SQLite

media_1447177180755.png

On this page, you are prompted whether to save the user name and password in a connection string.

media_1447177187291.png

This page allows you to select a query or a stored procedure.

Click Run Query Builder… to invoke a Query Designer dialog.

Adding Object DataSources

media_1447176836783.png

To add a Object source, click Add Data Source in the File menu.

media_1447176918776.png

Type in the Name of the new DataSource.

media_1447176950782.png

Select which object that will be used for this DataSource.

media_1447176984611.png

Add any filter criteria you would like to use and click the OK once finished.

Hyperlink

Static Hyperlinks

media_1447149059215.png

Click the Hyperlink command in the Insert tab of the main toolbar.

media_1447149126731.png

Text – specifies the display text;

Screen tip – specifies the text of the tooltip displayed when the mouse cursor points to the hyperlink;

Target frame – specifies the target frame for a link;

Address – specifies the hyperlink destination. A hyperlink destination can be a web page, a file, or a specific position within a document.

Dynamic Hyperlinks

media_1447149303630.png

Drag-and-drop the data field containing the correct URLs from the Data Explorer onto the Design Surface.

media_1447149192465.png

Binding – specifies a data member providing the hyperlink address;

Text – specifies the display text;

Screen tip – specifies the text of the tooltip displayed when the mouse cursor points to the hyperlink;

Target frame – specifies the target frame for a link;

 

media_1447149201534.png

To convert an existing field to a hyperlink, do the following.

Select a field and click Properties in the Data Tools: Field ribbon tab.

In the invoked menu, expand the Content Type drop-down list and select Hyperlink.

Sparkline

Add Sparkline

media_1447148717313.png

To add an empty sparkline to a document, click Sparkline in the General Tools: Insert ribbon tab.

media_1447148723191.png

To provide data to a sparkline, drag a corresponding item from the Data Explorer and drop it onto the highlighted area of the sparkline.

media_1447148734082.png

To convert an existing field to a sparkline, do the following.

Select a field and click Properties in the Data Tools: Field ribbon tab.

In the invoked menu, expand the Content Type drop-down list and select Sparkline.

Customize a Sparkline

media_1447148744585.png

To access the options of a selected SnapSparkline, click Properties in the Data Tools: Field ribbon tab.

media_1447148750759.png

You can choose from the different view types available for a sparkline by using the View Type property.

Line

media_1447148772962.png

Line Width – specifies the width of the chart line;

Highlight Negative Points – specifies whether or not to highlight all sparkline points that have negative values;

Show Markers – specifies the visibility of point markers on a sparkline;

Marker Size – specifies the size of markers for data points in a sparkline;

Max Point Marker Size – specifies the marker size of the data point with the highest value among all data points;

Min Point Marker Size – specifies the marker size of the data point with the lowest value among all data points;

Start Point Marker Size – specifies the size of a start point’s marker;

End Point Marker Size – specifies the size of an end point’s marker;

Negative Point Marker Size – specifies the marker size of all data points that have negative values;

Marker Color – specifies the color of line markers.

Area

media_1447148789683.png

Line Width – specifies the width of the chart line;

Highlight Negative Points – specifies whether or not to highlight all sparkline points that have negative values;

Show Markers – specifies the visibility of point markers on a sparkline;

Marker Size – specifies the size of markers for data points in a sparkline;

Max Point Marker Size – specifies the marker size of the data point with the highest value among all data points;

Min Point Marker Size – specifies the marker size of the data point with the lowest value among all data points;

Start Point Marker Size – specifies the size of a start point’s marker;

End Point Marker Size – specifies the size of an end point’s marker;

Negative Point Marker Size – specifies the marker size of all data points that have negative values;

Marker Color – specifies the color of line markers.

Area Opacity – Specifies the opacity (0-255) of the area fill color.

Bar

media_1447148800743.png

Bar Distance – specifies the distance between two bars of a sparkline;

Highlight Negative Points – specifies whether or not to highlight all sparkline points that have negative values

WinLoss

media_1447148814936.png

Bar Distance – Specifies the distance between two bars of a sparkline.