Skip to content

Overview of Data Sources

Ernst Peter Tamminga edited this page Apr 23, 2021 · 5 revisions

The Reports module retrieves data using a data source, which is a component capable of retrieving tabular data. The following data sources can be set and configured by a Super User on the module settings page:

  • Generic ADO.Net Provider Data Source: Retrieves data from any ADO.Net-compatible data source, such as Oracle, MySQL or Access.
  • DotNetNuke Data Source: Retrieves data from the database configured for this DNN installation.
  • Microsoft SQL Server Data Source: Retrieves data from any accessible Microsoft SQL Server instance.

Parameterized Queries

All data sources support the use of parameters in their queries. The following parameters are supported by default:

  • @UserID: Replaced with the ID of the User who is currently viewing the report.
  • @TabID: Replaced with the ID of the Tab (Page) on which this module is situated.
    Note: If the same module is copied to a different page, the @ModuleID parameter will be the same but the @TabID parameter will be different.
  • @ModuleID: Replaced with the ID of the Reports module on which the report is defined.
  • @PortalID: Replaced with the ID of the site on which the report is running.

To allow users to extend the Reports module queries, a simple URL parameter system has been added, which allows users to provide a list of QueryString parameters to be added to the query. The parameter names are in the following format: @url_[QueryString Parameter Name]. Only the parameters specified in the "Allowed URL Parameters" section will be added. In the Allowed URL Parameters field, add a comma separated list of URL QueryString parameters that can be used in the query. URL Parameter names will be prefixed with "url_", plus any data source specific prefix (such as "@" for SQL Server).

Managing Custom Add-In Data Sources

Note: This option has been disabled for incompatibility with DNN9.x

The Reports module can be extended in two ways by installing custom add-in data sources. These allow users to build reports to extract data from any kind of tabular data source. Custom visualizers allow users to display report data in any way they need. To manage the add-ins installed in the system, select Edit > Manage Add-Ins from the module actions menu. This displays a grid of the installed add-ins.

Manage Ad-Ins
Built-in components list

New add-ins can be installed using the Install Visualizer and Install Data Source commands at the bottom of the page. After clicking one of these links, select a ZIP file containing a Reports Add-In package and install it into the system. Custom Add-Ins installed using these commands can be uninstalled by clicking the Delete button in the far left column of the grid. A number of additional Add-Ins are included with the Reports module package, but are not installed by default due to external dependencies. This section details how to install the required components and use these Add-Ins.