Overview
Application Scenario
Built-in dataset refers to creating an original table that is similar to a database table and can serve as a template data source for designing reports.
If you create a template by querying a database on one machine, copying that template to another machine requires the corresponding connection, without which the template cannot be accessed. At this point, you can directly define the dataset of this template as a built-in dataset, or export the template on the machine where you created it as a built-in dataset template. In this case, the template can be accessed on any computer.
This function can help you easily perform functional testing or send templates to FanRuan's technical support for debugging and error corrections.
Function Description
You can create a Built-in Dataset in two methods.
1. Exporting as a built-in dataset template: You can directly export a template as a template (built-in data), which means all data used in the template will be automatically changed to the built-in data.
2. Defining a built-in dataset: You can manually input data into a built-in dataset and use the dataset to create templates.
Since directly defining a Built-in Dataset requires manually inputting data, which can be cumbersome, you are advised to take the first method. For details, see section "Exporting as Template (Built-in Data)."
Exporting as Template (Built-in Data)
This document takes the demo template Fuzzy Query as an example. The template datasets ds1 and ds2 are from database queries.
1. Choose File > Export > Template (Built-in Data), as shown in the following figure.
2. Rename the file name and save it, as shown in the following figure.
You can open the 123.cpt after performing a refresh. The dataset used in the template has become the built-in dataset.
Defining Built-in Dataset
1. Click the addition icon and select Built-in Dataset from the drop-down list, as shown in the following figure.
2. Add columns and set column names and field types on the built-in dataset setting page.
3. Input the specific data and rename the table Product Sales Information after setting the columns.
After completion, a dataset named Product Sales Information is added to the template dataset, as shown in the following figure.