Friday, February 17, 2012

Exporting to CSV add "_Value" or "_Value2" to the field name

Hi,

When I'm export a report that has been build in the "Report Builder" to csv to all fields caption added at the end of the field name the word "_Value" or "_Value2"

example:

field name in the report: EmployeeName

field in the csv : EmployeeName_Value

How can I remove this adding?

Thanks

Assaf

Assaf,

There is no easy way to change CSV heading in ReportBuilder, but you can save the report uploaded to the Report Server on a local disk, modify RDL and change names of the column headings, and upload it back to the server.

To do this, you can either search for "_Value" in the textbox names in RDL file and remove it, or add a child XML element node DataElementName in the RDL for each text box with column heading you want to modify:

<Textbox Name="Component_Value">
<DataElementOutput>Output</DataElementOutput>
<DataElementName>Component</DataElementName>
<CanGrow>true</CanGrow>
<Action>
....

The value of <DataElementName> element becomes a column heading in CSV output.

Note though that if you modify the uploaded report in ReportBuilder after you applied your changes, the changes will be lost as ReportBuilder re-generates RDL.

Thanks!

No comments:

Post a Comment