Summary

This article covers how to create an Ad-Hoc Report.

Table of Contents


To create a new Ad-Hoc report select Create Report in the Actions menu.


The Create Report screen will appear.


The Create Report screen contains the following fields:

  • Report Type: Select Report for a single table or graph report or Report Package to combine multiple single reports into a package.
  • Location of Data: Select the form (data table) that the report from which the report will pull data. Location for Data is only used for report type (Required Field).
  • Report Name: Name the report as it will appear on the Ad-hoc Report Screen (Required Field).
  • Report Description: Description of the report that is viewed on the Edit Report screen after report creation (Optional field).

Upon selecting Next the Fields screen will appear.

Fields

The Fields screen is where you can specify what fields within a form that should be included in the report. The Fields screen list all fields that have a visibility setting [link to] of Visible and Hide When Unused for the form selected on Location of Data on Create Report.


Document fields will display an option to include the related document expiration field.


All Fields Table

The All Fields Table lists the fields in the order they will appear in the report. The order can be changed by clicking over the field and dragging the field up or down to change the location of the list.
Selecting the edit icon will open the Modify Field name to edit how the field will be labeled in the report, if the field is a data field. If the field is a formula field the edit button will open the Expression Builder.


To delete a field, place a check in the box adjacent to the field to delete, select Delete Field in the dropdown and click Go.


Add Fields

Two types of fields can be added to the report:

  • Data Fields: This option represents questions on the form. Each question is represented by the header text associated with it.
  • Formula Fields: Custom expressions created using path language syntax. These expressions can be entered manually or with the Expression Builder.

Add Data Fields

In the All Fields tree check the checkbox beside all questions that should be included in the report. Selecting the checkbox by the top table label will select/deselect all questions on the table. Click the Select button to add the checked fields to the report.
Clicking on the question header text will add the individual question to the report.

Add Formula Fields

Select the Create Formula Field option from the Actions menu on the Fields screen to add a formula field to the report.


The Expression Builder will appear.



  • Enter a name for the formula field which will also be the name of the field in the report.
  • Select the data type for the expression from the list of available options (String, Number, Date, Boolean).
  • Complete the expression by referencing the Expression Operations section below and choosing the appropriate expression operations.

 

Expression Operations

Expression operators help to simplify the expression writing process by allowing you to select from a list of available operators that are then inserted into the expression. Each expression operator can be used in different ways and there is no minimum set of expression operators required to create an expression.

Operations

The basic operators are used on numbers and strings.

  • Add: Adds two numbers together or combines two strings
  • Subtract: Subtracts one number from another
  • Multiply: Multiplies two numbers together
  • Divide: Divides one number by another

Example

NameData TypeExpressionSample Results
First & Last NameStringfirstName+lastNameFirstLastName
Identified NameStringuniqueID + ‘_’ + protocol10001_BG2016-001

 

Comparison

The comparison operators return Boolean values and allow for numeric question types to be compared.

  • Equal: Returns true if the two values being compared are equal
  • Not equal: Returns true if the two values are not equal
  • Greater than: Returns true if the first value is greater than the second value
  • Less than: Returns true if the first value is less than the second value
  • Greater or equal: Returns true if the first value is greater than or equal to the second value
  • Less or equal: Returns true if the first value is less than or equal to the second value

Example

Because comparison operators are not used independently when creating formula fields, the following examples use comparison operators within Common Functions.

NameData TypeExpressionSample Results
Greater than 10000BooleaninvoiceBalanceDue>100001 for Over 0 for under
Requires Sr Management ApprovalStringIIf(invoiceBalanceDue>10000, ‘Yes’, ‘No’)Yes or No

 

Boolean

Boolean operators support the use of AND, OR and NOT to create more complex comparisons. Boolean operators return Boolean values.

  • And: Returns true if the expression on both sides of the ‘And’ operator is true
  • Or: Returns true if the expression on at least one side of the ‘Or’ operator is true
  • Not: Returns true if the expression would return false on its own

Example

Since Boolean operators are not used independently when creating formula fields, the following examples use comparison operators within common functions.

NameData TypeExpressionSample Results
Attention NeededStringIIf(visitPlanStrategy = null AND visitPlanFrequency = null, ‘Attention Needed’, ‘Good’)Attention Needed

Note: For literal text in the expression put ‘ ‘ around the text.

 

Function Group (FCT Group)

Function Groups classify the available functions into different groups. By selecting a group, you can change the list of functions available in the Functions drop down list. The following functions groups are available:

  • Common
  • String
  • Math
  • Date
  • Partial Date
  • Date Calc.

Functions
With functions you can perform more complex actions on fields using date calculations, conversions and conditional statements. The options that appear in Functions depend upon the value selected for Fct Group.

Additional information for each function can be accessed in the Expression Operators window by clicking the help-icon icon. Clicking the icon will prompt a window containing a description of the function and the function’s return type.



NameData TypeExpressionSample Results
30 Days After InvoiceDateAdd_Days(invoiceDate, 30 )2016-09-30
Days to DecisionNumberDays_between(sessionDate, decisionDate)15



Need more help?

Please visit the Fountayn Contact Information page.