Header in report for CSV format

Hello.

I have a report to which I put some headers, a table as I show below:

When I print the report in PDF, it prints everything correctly, with the headers configured. But for some reason, when I print the report in CSV format, it does not print the name that was placed in the design, but prints the full name of the column.

Unwanted format in the CSV:

Desired format in the CSV:

image

Should be just a case of changing the “Name” property of the Text Box.

The CSV file does not show the name configured in the report builder properties.

The file shows the alias of the BAQ
image

Ok, another one to try - set the DataElementName.

image

It’s in the properties window, once you have the textbox selected. I think SSRS uses this if it is set, but uses TextBox.Name if this isn’t set. I’m wondering whether you have DataElementName set?

The error continues

I think you may be out of luck. I would think csv comes from the field names.

Try setting the DataElementName on this text box instead, rather than the header. It’s this name that’s being output currently, not the “Cta. Cliente” one.

image

I do not see the option to do what you are telling me,

I think that entire header row is not being exported to CSV. What is being exported is the data row, the one with field names [CheckHed_Ven],[Vendor_Name]… etc etc.

You need to highlight and select the field that I show in my screenshot in yellow, and set DataElementName on that cell instead.

1 Like

It was possible to make the change by modifying the name property from the second record.

However, the only problem with this solution is that the format that Name supports is: Cta_Cliente

When what I need is: Cta Customer (The text allows spaces)

But I think this is as far as the solution goes.

Agreed, seems like a restriction that you won’t be able to get around.

If my solution above solved it for you, please consider marking it as such to assist others in future.

Cheers

We did it :sunglasses:… mostly, spaces aren’t tolerated but demonstrated that you can control the CSV header names.

1 Like

Sweet

1 Like