/// <summary>
/// To Format Column Names for Rdlc Binding
/// </summary>
/// <param name="reportsTable"></param>
/// <returns></returns>
public static DataTable GetDrlcFormattedTableForActivity(DataTable reportsTable)
{
try
{
foreach (DataColumn column in reportsTable.Columns)
{
if (column.Ordinal == reportsTable.Columns.Count - 1)
column.ColumnName = column.Caption = "ArrivalDelay";
else
if (column.Ordinal == reportsTable.Columns.Count - 2)
column.ColumnName = column.Caption = "DepartureDelay";
else
column.ColumnName = column.Caption = "Field" + (column.Ordinal + 1).ToString();
}
return reportsTable;
}
catch (Exception ex)
{
throw ex;
}
}
/// To Format Column Names for Rdlc Binding
/// </summary>
/// <param name="reportsTable"></param>
/// <returns></returns>
public static DataTable GetDrlcFormattedTableForActivity(DataTable reportsTable)
{
try
{
foreach (DataColumn column in reportsTable.Columns)
{
if (column.Ordinal == reportsTable.Columns.Count - 1)
column.ColumnName = column.Caption = "ArrivalDelay";
else
if (column.Ordinal == reportsTable.Columns.Count - 2)
column.ColumnName = column.Caption = "DepartureDelay";
else
column.ColumnName = column.Caption = "Field" + (column.Ordinal + 1).ToString();
}
return reportsTable;
}
catch (Exception ex)
{
throw ex;
}
}
No comments:
Post a Comment