Skip to main content

Report Data Sources

A Data Set (AxReportDataSet) is the object within an SSRS report that defines where data comes from and what fields are available to the report design. Each report contains one or more data sets, and each data set connects to a data source — an AOT query, a Report Data Provider (RDP) class, business logic, or an enum provider.

Data sets are the bridge between the D365 application data and the SSRS rendering engine. They define:

  • The data source type and connection (query name, RDP class, etc.).
  • The fields available for binding to design elements.
  • The parameters that filter or control the data retrieval.
  • The default layout used when the data set is dragged onto an Auto Design.

Data Set Structure

Each data set contains three child collections:

Fields (AxReportDataSetField)

Fields represent the columns of data available from the data set. When using query-based data sets, fields are auto-populated from the query's data source columns. When using RDP-based data sets, fields correspond to the columns of the temporary table returned by the RDP class.

Each field carries metadata that controls how data is displayed and aggregated:

  • FieldType — whether the field contains data values or serves as a grouping field.
  • AggregationFunction — how values should be aggregated (Sum, Count, Avg, etc.) when the field is used in a grouped context.
  • GroupingType — for grouping fields, whether the field groups data as a Category or a Series (relevant for charts and matrices).
  • Caption — the display label shown in column headers.
  • FormatString — a .NET format string controlling how values are rendered (e.g., {0:C} for currency, {0:d} for short date).

Parameters (AxReportDataSetParameter)

Data set parameters are the link between report-level parameters and the data retrieval logic. When a report parameter needs to be passed to a query range or an RDP contract property, a data set parameter maps the two.

Each data set parameter has:

  • Parameter — the name of the report-level parameter this maps to.
  • Alias — an alias for the query parameter.
  • DataType — the data type expected by the underlying data source.
  • MultiValue — whether the parameter accepts multiple values (e.g., a list of account numbers).

Field Groups (AxReportDataSetFieldGroupBase)

Field groups organise related data set fields into logical groupings. When you drag a field group onto an Auto Design, all fields in the group are added together, maintaining their order and formatting.


Data Source Types in Detail

Query-based Data Sets

The simplest approach. Set DataSourceType to Query and the Query property to an AOT query name. The framework executes the query at runtime and populates the data set fields automatically.

Advantages:

  • No X++ code required.
  • Dynamic filters supported via DynamicFilters property.
  • The user can modify the query at runtime through the SysQuery dialog.

Limitations:

  • Cannot perform complex business logic or cross-table calculations.
  • All data must be expressible as a single query with joins and ranges.

RDP-based Data Sets

The most common pattern for production reports. Set DataSourceType to ReportDataProvider and the Query property to the RDP class name. The RDP class processes business logic and populates a temporary table, which the report reads as its data source.

Advantages:

  • Full X++ business logic available.
  • Can perform complex calculations, aggregations, and cross-table lookups.
  • Temporary table output is strongly typed and easy to extend.

Limitations:

  • Requires X++ development.
  • Data is fully materialised in a temp table before rendering begins.

Business Logic Data Sets

An older approach where X++ methods on the report class itself provide data. The DataSourceType is set to BusinessLogic. This pattern is largely superseded by RDP classes and is rarely used in new development.

Enum Provider Data Sets

A specialised data source type (DataSourceType = EnumProvider) that provides the values of a base enum as rows. This is typically used to populate parameter dropdowns or to provide enum-based lookup data for reports.


Dynamic Filters

When DynamicFilters is set to true on a query-based data set, the report dialog includes a query modification section (SysQuery form) that allows users to add, remove, and modify filter criteria at runtime. This is the same query modification dialog used throughout D365 F&O.

Dynamic filters are only applicable to query-based data sets — RDP-based data sets use the data contract parameters instead.


Data Methods (AxReportDataMethod)

Data methods are X++ methods defined at the report level that can be called from report expressions. They provide a way to perform custom formatting, calculations, or lookups that go beyond what SSRS expressions can handle natively.

Each data method has:

  • A Name used to reference it from design expressions.
  • A ReturnType defining what the method returns.
  • Parameters (AxReportDataMethodParameter) with name and data type.

External Data Sources (AxReportExternalDataSource)

External data sources allow a report to connect to data outside the standard D365 database — for example, an OLAP cube or an external SQL database. The Provider property specifies the connection type (OLAP or SQL), and ConnectionString provides the connection details.

warning

External data sources bypass the D365 security model. Use them only when absolutely necessary and ensure appropriate access controls are in place at the data source level.


Properties

Data Set Properties

26/26 properties
PropertyDisplay NameTypeDescription
Data SetAxReportDataSet
NameNameStringThe name of the element.
TagsTagsStringTags for this element separated by semicolon.
QueryQueryStringSpecifies the query string for the given data source and data source type.
DataSourceTypeData Source TypeDataSourceTypeIndicates the data source type for the given data source. Values: DatabaseStoredProcedure (0), Query (1), BusinessLogic (2), ReportDataProvider (3), EnumProvider (4).
DefaultLayoutDefault LayoutReportLayoutIndicates the default layout that should be used when performing a layout of this dataset. Values: Table (0), TopDownList (1), HorizontalList (2), Matrix (3), ColumnChart (4), BarChart (5), LineChart (6), PieChart (7), DoughnutChart (8).
DynamicFiltersDynamic FiltersBooleanIndicates whether the report will make use of the SysQuery Form like functionality.
DataSourceData SourceStringThe datasource for the dataset being used.
Data Set FieldAxReportDataSetField
NameNameStringThe name of the element.
TagsTagsStringTags for this element separated by semicolon.
DataTypeData TypeStringSpecifies the data type of this field. (read-only)
CaptionCaptionStringSpecifies a caption for the field.
FormatStringFormat StringStringThe format string that should be used when formatting data from this field.
AliasAliasStringThe alias of the data column returned by this field. (read-only)
FieldTypeField TypeDataSetFieldTypeSpecifies whether this field is a data field or a grouping field. Values: Data (0), Grouping (1).
AggregationFunctionAggregation FunctionAggregationFunctionThe aggregate function that should be used to aggregate data within this field. Values: None (0), Count (1), CountDistinct (2), Sum (3), Avg (4), Min (5), Max (6), Var (7), VarP (8), StDev (9), StDevP (10).
GroupingTypeGrouping TypeGroupingTypeIf this is a grouping field, specifies whether it is a category or a series grouping. Values: Category (0), Series (1).
UserDefinedUser DefinedBooleanIndicates whether this field is user defined. (read-only)
DisableAutoCreateInDataRegionDisable Auto Create In Data RegionBooleanIndicates whether the field is used to create a DND data region field.
DisplayWidthDisplay WidthStringThe default display width for data from this field.
ParentGroupingParent GroupingStringThe parent grouping of the dataset field.
Data Set ParameterAxReportDataSetParameter
NameNameStringThe name of the element.
TagsTagsStringTags for this element separated by semicolon.
AliasAliasStringThe alias of the query parameter.
DataTypeData TypeStringSpecifies the data type of this parameter.
MultiValueMulti ValueBooleanIndicates whether this parameter is a multi-valued parameter. (read-only)
ParameterParameterStringParameter used for the dataset parameter.

Report Parameter Properties

11/11 properties
PropertyDisplay NameTypeDescription
Parameter BaseAxReportParameterBase
NameNameStringThe name of the element.
TagsTagsStringTags for this element separated by semicolon.
ParameterAxReportParameter
DataTypeData TypeStringSpecifies the data type for this parameter.
AllowBlankAllow BlankBooleanIndicates whether this parameter value can be blank.
NullableNullableBooleanIndicates whether this parameter value can be null.
PromptStringPrompt StringStringSpecifies the prompt string to use for this parameter.
MultiValueMulti ValueBooleanIndicates whether this parameter can be multi-valued.
UserVisibilityVisibilityParameterVisibilityIndicates whether this parameter is visible, hidden or internal. Values: Visible (0), Hidden (1), Internal (2).
AOTQueryAOT QueryStringIndicates which AOT query to open in the SysQuery Form.
Parameter GroupAxReportParameterGroup
CaptionCaptionStringThe caption for the parameter group.
LayoutDirectionLayout DirectionLayoutDirectionLayout direction of the parameter group in UI. Values: Vertical (0), Horizontal (1).

Data Method Properties

6/6 properties
PropertyDisplay NameTypeDescription
Data MethodAxReportDataMethod
NameNameStringThe name of the data method.
TagsTagsStringTags for this element separated by semicolon.
ReturnTypeReturn TypeStringThe return type of the data method.
Method ParameterAxReportDataMethodParameter
NameNameStringThe name of the method parameter.
TagsTagsStringTags for this element separated by semicolon.
DataTypeData TypeStringThe data type of the method parameter.

External Data Source Properties

6/6 properties
PropertyDisplay NameTypeDescription
External Data SourceAxReportExternalDataSource
NameNameStringThe name of the element.
IsObsoleteIs ObsoleteNoYesDetermines whether the element is deprecated or not. Values: No (0), Yes (1).
VisibilityVisibilityCompilerVisibilityThe visibility of the element. Values: Private (0), Protected (1), Public (2), Internal (3), InternalProtected (4).
TagsTagsStringTags for this element separated by semicolon.
ConnectionStringConnection StringStringSpecifies the connection string to use for the data source.
ProviderProviderExternalDataSourceTypeIndicates the provider for this data source. Values: Olap (0), SQL (1).