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
- Open the Report (configuration).
- Select the Data Set Editor tab.
- Set the Data Source Type to Script.
- If a report parameter is to be passed to the script, configure the report parameter.
- Enter the Database Connection.
- Click Edit Script.
- 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;
}
} - Edit the script as required.
- Click Save.