Menu
← All practical lessons
PRACTICAL COURSE / LESSON 6 OF 8

Create a report from a SQL dataset

Follow the current DynamicData → ReportStudio workflow through parameters, design, validation, and export.

What you will achieve

A time-filtered report with matching dataset fields and verified HTML/PDF export.

Before you begin

  • PlgDynamicData and PlgReportStudio enabled with configuration rights.
  • A readable business database and test data. Archive SCADA history into a queryable table/view first if required.

01 · Configure a data source

  1. Open /dynamic-data/datasource and configure the database server, database, and appropriately scoped account.
  2. Save and test the connection. Keep passwords in server-side configuration, not templates or browser scripts.
Expected result

The connection succeeds against the intended practice database.

02 · Create and preview a dataset

  1. Open /dynamic-data/dataset and write a read-only query with stable output aliases such as device_name, value, and sample_time.
  2. Declare the parameters actually used by the SQL, including types and test values.
  3. Preview and check column names, types, ordering, and time boundaries; distinguish an empty result from a query error.
Expected result

The same parameters return repeatable, understandable data.

03 · Create a query report and bind the dataset

  1. Open /report/list, create a Query report, and bind the dataset with its assigned alias, such as ds1.
  2. Match runtime parameters to the dataset, then configure sheets, title, widths, and table headers.
  3. Report fields come from SQL results. A SCADA channel number is not a report field, and legacy placeholders may not apply.
Expected result

The designer can discover bound columns and parameters.

04 · Insert fields and validate the template

  1. Use the designer’s field panel for row/parameter placeholders and verify aliases, column names, and expansion direction.
  2. Run template validation, fix errors, and preview with the same parameters. Check pagination, units, merges, and empty results.
  3. Save, close, and reopen to verify the template and bindings.
Expected result

Validation passes and preview values/row counts match the dataset query.

05 · Verify runtime and exports

  1. Run the report as a permitted viewer, enter the time range, and inspect parameter defaults and rights.
  2. Export a supported HTML, PDF, or package and inspect headers, detail rows, totals, and text across pages.
  3. If an export limit truncates output, narrow the range or adjust site settings before treating the file as complete.
Expected result

Runtime and exported files agree, with completeness verified.

Create a report from a SQL dataset
Interface reference. Projects and values are illustrative; available features depend on the deployed version.
Lesson acceptance

Check only after verification. Progress stays in this browser.

0 / 3 verified

Troubleshooting

Fields are present but blank

Check dataset rows, binding alias, field casing, parameter types, and template diagnostics.

Saving reports a version conflict

Preserve the current edit and merge against a fresh template snapshot; do not simply substitute a newer version number.

Further reading