New to Telerik Reporting? Download free 30-day trial

CubeDataSource Wizard of the Report Designer

After the CubeDataSource wizard appears you have to perform the following steps:

  1. Choose your data connection In this step you have to specify a data connection for the CubeDataSource component. There are two possible options for specifying the data connection:

    • Choose an existing data connection - selecting this option allows you to specify an existing data connection stored in the configuration file of the current project from the drop-down list.

      The connection string stored in the configuration file of the report class library is used only during design time. When running the report in production it is necessary to copy that connection string to the corresponding configuration file of your application or web site as well.

    • Specify a new connection string – selecting this option allows you to enter a new connection string directly in the text area below. Instead of typing the connection string manually you can click "Build" to open the Connection Properties dialog and configure a new database connection there. Enter the name of the database server in the "Server name" field and choose your cube database from the "Database name" list. Click "Test connection" to verify that the connection is valid and the chosen database is available. When done with the dialog click "OK" to close it and accept the new connection.

  2. Save the connection string This step appears only if you have specified a new connection string in the previous one. Choose "Yes, save the connection with the following name" to store the connection string in the application configuration file under a specific name. Type a name for the connection or use the provided default name if applicable.

    Saving the connection string in the application configuration file simplifies the process of maintaining your application if the database connection changes. In the event of a change in the database connection you can edit the connection string in the application configuration file as opposed to editing the source code and having to recompile your application.

  3. Configure data source command In this step you have to specify an MDX select statement to retrieve data for the data source.

    The CubeDataSource component does not impose any restrictions over the format of the MDX query. However, to ensure that the retrieved data is in a proper format for visualization you should follow the next rule: specify the measures you want to aggregate in the column axis and the dimensions to group by in the row axis of the query; also avoid using more than two axes in a single query.

  4. Configure data source parameters In this step you have to specify the parameters for the MDX query. Click "New" to add a new parameter to the CubeDataSource or "Delete" to remove an existing parameter. Use the arrow buttons to change the order of the parameters when necessary.

    • Specify a valid name for each data source parameter in the "Name" column. You can also choose that name from the list of existing parameter names which are derived directly from the MDX select statement.
    • Specify a default value for the parameter in the "Value" column or bind it via an expression. You can bind a data source parameter directly to a report parameter. This way you can use the standard report parameter user interface to provide values for your data source parameters. The drop-down list of the "Value" column displays all existing report parameters. You can create a new report parameter by choosing <New Report Parameter> from the list. Alternatively you can invoke the Edit Expression dialog by choosing <Expression> from the list. This allows you to specify an arbitrary expression to evaluate for the parameter.
  5. Configure design time parameters This step allows you to specify a value for each data source parameter that can be used at design time to retrieve the schema of the CubeDataSource component. At design time there is no expression context, so expressions are not supported and the values must be constant.

    Specifying design time values for the parameters is necessary because the designer might need to execute the MDX query of the data source to refresh the schema displayed in the Data Explorer tool window and the Edit Expression dialog. These values do not affect the execution of the MDX query at runtime however.

  6. Configure data source fields This step allows you to specify short aliases for the data source fields that can be used for data binding in expressions. Enter an appropriate alias for each data source field in the "Alias" column of the grid or leave the default suggestion if applicable.

    The default fields returned by an MDX query often are too long and might need to be escaped when used in expressions. To overcome this it is advised to always specify shorter and more descriptive aliases for them.

  7. Preview data source results You can preview the result set returned by the CubeDataSource before completing the wizard. Click "Execute Query" to execute the MDX query and display the retrieved data. If the data source has parameters the wizard displays a pop-up dialog before each preview which allows you to enter the parameter values. This is the last step of the wizard. After pressing "Finish" the wizard will configure the CubeDataSource component with the specified settings and close.

In this article