private Syncfusion.RDL.DOM.ReportDefinition EditDataSet(object dataTable, Syncfusion.RDL.DOM.ReportDefinition reportDefinition)
{
foreach(Syncfusion.RDL.DOM.DataSet dataset in reportDefinition.DataSets)
{
dataset.Fields = new Syncfusion.RDL.DOM.Fields();
foreach (DataColumn column in (dataTable as DataTable).Columns)
{
Field field = new Field()
{
Name = column.ColumnName,
DataField = column.ColumnName,
TypeName = column.DataType.ToString()
};
dataset.Fields.Add(field);
}
}
return reportDefinition;
} |