Obtain Report Data Using a Script

You can use a script that is compiled inside MineMarket.

Parameters are passed to the script in a semicolon-delimited list.

Security Note: You need the Allow report maintenance security right in the Reports domain security rights group for this activity.

Activity Steps

  1. Open the Report (configuration).
  2. Select the Data Set Editor tab.
  3. Set the Data Source Type to Script.
  4. If a report parameter is to be passed to the script, configure the report parameter.
  5. Enter the Database Connection.
  6. Click Edit Script.
  7. Insert the following C# script code stub to add rows to the data table.
    Copy
    using System;
    using System.Data;
    using Mincom.MineMarket.DAL;
    using Mincom.MineMarket;
    using System.Collections.Generic;
    public class BTReportTableHandler : IBTReportTableHandler
    {
        public BTReportTableHandler() {}
        /// <summary>
        /// RunTable populates DataTable which is used to populate report table
        /// </summary>
        /// <param name="connections"> a list of connections to use for the script</param>
        /// <param name="parameterValues">a list of parameters and values</param>
        /// <returns>DataTable which contains all required data</returns>
        public DataTable RunTable(BTReportConnectionList connections,Dictionary<BTReportParameter, object> parameterValues)
        {
            DataTable dataTable = new DataTable("Table");
            ...
            return dataTable;
        }
    }
  8. Edit the script as required.
  9. Click Save.