Possible to use DataTable DataColumn.Caption property in report?
Is it possible to use the DataTable DataColumn.Caption property as the column headers for a TableObject in a report?
I'm using the following code to set the data source (which is a DataTable):
DataSourceBase employees = Report.GetDataSource("Employees");
And each column header text is set thus:
Table1.PrintRow(0);
for (int i = 0; i < colCount; i++)
{
Cell1.Text = soilTests.Columns.Alias;
Table1.PrintColumn(0);
}
The text is set to the DataSourceBase column Alias. However, a DataTable can have user-friendly column names in the DataColumn.Caption property and it would be useful to use these in the report. Does anyone know if it's possible to access these from within the report template code behind?
I'm using the following code to set the data source (which is a DataTable):
DataSourceBase employees = Report.GetDataSource("Employees");
And each column header text is set thus:
Table1.PrintRow(0);
for (int i = 0; i < colCount; i++)
{
Cell1.Text = soilTests.Columns.Alias;
Table1.PrintColumn(0);
}
The text is set to the DataSourceBase column Alias. However, a DataTable can have user-friendly column names in the DataColumn.Caption property and it would be useful to use these in the report. Does anyone know if it's possible to access these from within the report template code behind?
Comments