Share via


How to: Define a Report Data Source

Important

This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

To retrieve data for your reports, you can use the predefined Dynamics AX or DynamicsAXOLAP data sources to connect to the Microsoft Dynamics AX application databases. Or, you can define your own data sources. For example, if you want to use a database other than the application database, you must define a data source to specify connection information and a provider type for that database. The following procedure explains how to define a data source.

Note

When accessing data from the Microsoft Dynamics AX database, it is recommended that you use the predefined Dynamics AX data source to ensure that appropriate security is enforced. When you use the predefined Dynamics AX data source, the data access requests go through the Role and Task security system.

To define a report data source

  1. In Solution Explorer, right-click the reporting project that you want to add a report data source to, point to Add, and then click Report Data Source. A data source is added to the project with a name like ReportDataSource1 and appears in Model Editor.

  2. Select the node for the report data source.

  3. In the Properties window, set the following properties:

    Property

    Description

    Connection String

    The connection string that the report server uses to connect to the data source. The connection string includes a set of name/value pairs to specify connection information, such as server name, database name, and authentication method. Here are some examples.

    SQL

    Server=localhost;Database=LegacyInventoryData;Integrated Security=SSPI

    OLAP

    Data Source=localhost;Initial Catalog=DynamicsAX;Integrated Security=SSPI

    Name

    A name for the data source.

    Namespace

    The namespace for the data source.

    Provider

    The provider for the data source. There are two provider types that you can choose from: SQL and OLAP.

    Note

    Reports using a SQL provider for the data source are not supported to run in a batch, run on the server, or run from EP.

    Reports using an OLAP provider for the data source may show an N/A item group if the cube has a dimension that is striped by Company. If you need to exclude N/A values, use MDX to filter the N/A values in the report.

Next, you can add a dataset and use the data source for a report. For more information, see How to: Define a Report Dataset.

See also

Report Data Overview