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?

Comments

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.