ODBC data source in Stimulsoft reports

Tekla PowerFab
2023
Tekla PowerFab Tekla PowerFab GO

ODBC data source in Stimulsoft reports

For items that are in the database but not included in the report, you can add a data source to provide that information to the report template.

There are several things to consider when adding data sources:

  • It is always best to make these kinds of design changes in a new user-defined report. See Create user-defined reports for customizing.
  • If the item that you are adding is universally used, you should send a development request to include the field in the default data source for the report.
  • It is important for the organization of the report to use a consistent naming pattern when adding items. Observing the methods already in use is a good starting point.
  • Due to the amount of data in the source, it may be necessary to apply a filter to the source.
  • There needs to be a way to link the source data to provide the proper relationship so that the correct data is provided for the record or summary being displayed. This may require that multiple tables are added.

    For example, if you want to include the job status description, you may need to add both the “projects” table to get the “jobstatusid” for the project and the “jobstatuses” to be able to link the “jobstatusid” to the correct description.

Note: When you are adding the ODBC data source, you must open the program directly through the application shortcut or files. You cannot use MySQL Service Manager to open the program to successfully add the ODBC data source.

Add an OBDC data source

  1. Open the report in the Designer.
  2. Go to Page > Panels > Dictionary.
  3. Right-click Data Sources.

  4. Select Data Source.

    The New Data Source dialog box opens.

  5. Select OBDC.

    The New OBDC Connection dialog box opens.

  6. Click OK.

    Do not change the name.

    The Select Data dialog box opens.

  7. Click OK.
  8. Save and close the report.

Add tables to the ODBC data source

  1. Open the report in the Designer.
  2. Go to Page > Panels > Dictionary.
  3. In the navigation tree, right-click ODBC[ODBC].
  4. Select Data Source.

    The New Data Source dialog box opens.

  5. Select OBDC.

    The New OBDC Connection dialog box opens.

  6. Click OK.

    The Select Data dialog box opens.

  7. Select all the required tables and click OK.

The selected tables are available in the navigation tree under the ODBC[ODBC] source.

Add relation to the detail data band source

  1. Open the report in the Designer.
  2. Go to Page > Panels > Dictionary.
  3. Right-click the detail data band source and select New Relation.

    The New Relation dialog box opens.

  4. Complete the following:
    • Name in Source
    • Name
    • Alias
  5. Select the Parent data source that is being linked from the drop-down list.
  6. Select the data source field in the Parent data source.
  7. Select the data source field in the Child data source that links to that field.

The name of the relation is now available in the Child data source and the records are linked based on the fields set in the relation.

Note: This process to add the proper relations may need to be repeated to provide relations to the required data through multiple tables.

Have the relation populated with the data from the added source

  1. Open the report in the Designer.
  2. Go to Page > Panels > Properties.
  3. At the top of the panel, click the first item on the drop-down list.

    It will be labeled as Report.

  4. In the Data section ensure that Cache All Data is set to True.
  5. Save the report.

The data that has been added and related to the data source for the report is available.

Was this helpful?
Previous
Next