Creating a Report DataPage
Report DataPages are multi-page applications that provide the following high-level capabilities:
- An interactive search form or pre-defined search criteria
- A results screen where matching records are displayed in a tabular format
- An optional details page where one record is displayed and some or all fields may be editable
- Automatic notification and acknowledgement emails can be generated if data is modified
Creating a Report with Interactive Search
Search and Reports are created easily through DataPage Wizards. This page explains the the process for creating a Search and Report that lets users perform ad-hoc queries.
- Ensure that you already have a table or view for this Report.
- From the File menu, select New DataPage or in the DataPages view, click
on the toolbar. This brings up the DataPage Wizard.
1. DataPage Properties
Click on the Reports icon on the left and on the one of the Report Types icon (Tabular, Gallery, List, Details, Combined Chart and Report) on the right to select the DataPage type.
- Tabular – Returned records are displayed in rows and columns.
- Gallery – Each returned record is displayed in a separate cell, gallery-style. Perfect when you need to show long descriptions or pictures for each record.
- List – The search returns a Google-style list of records.
- Details – Skips the results page and go directly to the Details Page of the first matching record. This option is ideal when you are certain there is only one record matching the search criteria.
- Combined Chart and Report – Search results are shown in a table and in a chart simultaneously. This report type is described here.
Click Next.
2. DataPage DataSource
Select your table or view as data source and enter a name for your DataPage.
Select a Style and a Localization to apply.
Advanced Options
Check Enable Advanced Options to access field layout options and set up external associations and defaults.Check Enable parameters to enable your DataPage to pass and receive parameters. Read more about using parameters here.
Click Next.
3. Search Type
Continue with the default choice of Search Form. Creating a Search and Report with Pre-defined Criteria is outlined below.
To allow automatic focus of cursor on the first field of the search form, check the Automatically focus cursor on first field option.
Click Next.
4. Select Search Fields
Select the fields that are going to be elements of your search form.
For most scenarios, the Boolean operator must remain at its default Results that match all criteria (AND) state.
Click Next.
5. Configure Search Fields
The fields you selected are listed on the left. Select each field, one at a time, and configure its properties on the right. For a description of available comparison types and form elements, click the corresponding link.
Click the Insert button
to add multiple criteria per field, a section, a virtual field, an HTML block, CAPTCHA or header and footer.
Use the Move up
and Move down
buttons to change the display order of the sections, fields and blocks.
Advanced Options
Click the Advanced tab to configure the following:
Layout Options
- By default, every form field starts on a new line. Check Continue next element on same line to place multiple fields on one line.
- The Label Position radio buttons are useful when you want to override the section's label position for this particular field.
External Associations and Defaults
- By default, form fields are blank on load. You can either Assign a static value to provide a default value for the field or Receive parameter from another DataPage or from an external application.
- On exit, the form can Pass field value to next page as a parameter.
Insert Special to filter data by user IP or DataPage host:
- User IP Address – The search only returns records which are equal to the User IP Address.
- DataPage Host – The search only returns records which are equal to the DataPage Host. Select host type as Complete URL (including parameters), Page URL (no parameters), or Domain name.
Note that you can only insert special for hidden text fields.
Click Next.
6. Select Results Page Fields
Select the fields you want to display in the results page.
Click Next.
7. Configure Results Page Fields
Select each of the fields from the list on the left, and on the right configure labels and formatting and rendering options. Add HTML blocks and header and footer as desired.
Click Next.
8. Search Results Options
Configure Results Page display options:
- Sort order – Select the sort fields of your Results Page and choose Ascending or Descending options through the toggle buttons. Up to four fields can be used for sorting. You have the option to sort search results by fields that are not chosen to display on the Results page.
- Records per page enables you to turn on automatic paging when many records are found. By default, 25 records per screen are displayed for a fast download and improved user experience; however, more or all matching records can be displayed on one page if necessary.
Configure Results Page interactive options:
- Enable interactive sorting to let users sort the results by any column by clicking on the column's header. Clicking the header again reverses sorting order.
- Let user delete record is not recommended for publicly-accessible DataPages.
Configure Accessibility options:
- Enable 508-compliant table headers – Select this option to use tags to render table headings in Results Pages. This setting is off by default to ensure backward-compatibility with existing DataPages. Selecting this option does not change how tables are rendered in web browsers, but it does change HTML used to create those tables.
Advanced Options
Click the Advanced tab to configure the following:
Record Options
- Total records returned refers to the largest number of records you would like to retrieve through this DataPage. By default all matching records are returned, but for very large tables or views this may not be desired.
- Hide record count to hide the "Records (on this page) of (all records found)" line shown at the bottom of the page by default. This is useful when you expect your search results to be displayed on a single page.
Download Options
- Enable users to download search results to their computers in either of two File formats: MS Excel Spreadsheet (an XML file) or comma-separated text file. Check Zipped to compress data in ZIP format for faster download.
- Set up Default file name to customize a file name for data download. Select the Add date (yyyy-mm-dd) checkbox to add a date to the file name.
- Number of records enables you to limit the number of records users can download or, conversely, allow users to download all records in the base table or view, whether they match the search criteria or not.
- Use fields from Results Page or the fields you will select for the Details Page. You must enable Details Page first for this option to be available.
Inline options
- Check Update to let users edit the data in Results Pages.
- Check Insert to let users add new records through Results Pages. Select if the blank cells should be displayed on Top or at the Bottom of Results Page.
Note that in-line options are not recommended for publicly-accessible DataPages.
9. Details Page
Choose whether you want a details screen to be linked to each search result.
When Details Page is enabled, Caspio Bridge adds a link after each record the user must click to view details. Instead of the action link used by default, you can designate a Specific data field in search results to be used as a link.
If desired, instruct Caspio Bridge to Always skip Results Page when only one record is found.
Click Next or Finish.
10. Select Details Page Fields
This and the following steps are skipped if you did not enable Details Page.
Select the desired fields for your Search and Report's details screen.
Click Next.
11. Configure Details Page Fields
Select each field and configure its properties. Add sections, virtual fields, HTML blocks, and header and footer as desired.
Advanced Options
Use the Insert button
beside the Label text box to insert any of the table field values into the label. Field values can be formatted as described under Advanced Options here.
Click the Advanced tab to configure the following:
Layout Options
- By default, every form field starts on a new line. Check Continue next element on same line to place multiple fields on one line.
- The Label Position radio buttons are useful when you want to override the section's label position for this particular field.
External Associations and Defaults
- By default, form fields are blank on load. You can either Assign a static value to provide a default value for the field or Receive parameter from another DataPage or from an external application.
- On exit, the form can Pass field value to next page as a parameter.
Use the Insert button
beside the Label text box to insert any of the table field values into the label. Field values can be formatted as described under Advanced Options here.
Click Next or Finish.
12. Details Page Options
This step is skipped if you did not include at least one editable or hidden field into the Details Page.
Enable Acknowledgement email and/or Notification email, if desired. For acknowledgement emails, select the field that will contain the user's email address. The acknowledgement email will be sent to the value found in this field in the Details Page.
To allow automatic focus of cursor on the first editable field of the Details Page, check the Automatically focus cursor on first field option.
Destination Options become available for your Details Page similar to those in Submission Forms (Step 5).
Click Next to configure the emails, or click Finish.
13. Acknowledgement Email
This step is skipped if you did not enable Acknowledgement Emails.
Acknowledgement emails may be sent on your behalf to users who submit a DataPage. You have already identified the field of the form which contains the recipient's email address. Now, configure the remaining options as described here.
14. Notification Email
This step is skipped if you did not enable Notification Emails.
Notification emails are sent to fixed email addresses, normally within your organization, to notify one or more people that an updated submission is made. You may assign a Table-driven value to the Reply-to field from the drop-down list or choose to use the same email address as the one in the From field. Configure your notification emails as described here.
15. Finish
A confirmation that your DataPage has been created is displayed. Click Close.
Creating a Report with Pre-defined Criteria
To create a Search and Report to filter data without end user interaction, begin as described above. When you reach step 2, Search Type, select the Pre-defined Criteria option and click Next.
Advanced Options
Check Enable parameters in criteria to filter data based on parameters passed from other pages.Select if you wish to enable Caspio Bridge parameters only or both Bridge and external parameters.
4. Select Filtering Fields
Select the fields that you are going to use in filtering data.
For most scenarios the Boolean operator must remain at its default Results that match all criteria (AND) state.
Click Next.
5. Configure Filtering Fields
The fields you selected are listed on the left. Select each field, one at a time, and configure its filtering criteria on the right. Consult the description of available comparison types if needed.
Click the Insert button
to configure multiple criteria per field.
Click the Advanced tab to configure external association and defaults for each filtering field:
- Assign value from Standard Tab to provide a fixed criteria for the field.
- Receive parameter from a preceding page or external application to perform filtering based on dynamic criteria. Define filtering behavior with empty or missing parameters:
- Value required – If the parameter is missing or empty, the search does not return any records.
- If empty, match blank values only – The search returns any records where this particular field is empty. AutoNumber and Yes/No fields do not have this option.
- If empty, ignore criteria – The search ignores this criteria.
- If empty, match all records – The search returns all records from the table, no matter what their values are.
Note that the distinction between the 3rd and 4th criteria definitions is only visible when multiple criteria are used for one field. When only one criteria is defined for a field, both criteria definitions return the same results.
- Insert Special to filter data by user IP or DataPage host:
- User IP Address – The search returns only the records that are equal to the User IP Address.
- DataPage Host – The search returns only the records that are equal to the DataPage Host. Select desired host type: Complete URL (including parameters), Page URL (no parameters), or Domain name.
Note that the Insert Special option is only available for text fields.
Click Next.
Now, proceed as described beginning with step 6, Select Results Page Fields above.
