For csv export, the header of a column is determined by the DataElementName
property of the textbox which actually contains the data. If the DataElementName
property is not explicitly set by the user, DataElementName automatically gets defaulted to the value of the textbox.Name
property.
That being said, I believe you're getting this issue because RDL has a restriction that both a reportItem.Name
and reportItem.DataElementName
property must be CLS-compliant identifiers. The headings like "Phone #"
, "Other Name(s)"
, etc... are not CLS-Compliant.
You can verify this by opening up the report in BIDS or RB and trying to set the DataElementName/Name property of the textbox containing the data to those names.
You will get an error which states the following:
Property Value is not valid. Specify a valid name. The name cannot contain spaces, and it must begin with a letter followed by letters, numbers, or the underscore character (_).