patternsqlMinor
Keep original column names in SSRS report designer 3.0?
Viewed 0 times
ssrscolumnoriginalkeepdesignernamesreport
Problem
I have a query that returns over a hundred columns. The column names contain important underscores, >,
-
Transform the XML reporting rdl file.
-
Transform the XML reporting rdl file.
Solution
- Find and Replace one of the desired characters, such as an Underscore, in the dataset query SQL with a non-sense string, such
as "3145234jhasdf" ..... (minus the quotes).
- In Report Builder, create a DataSet with the resulting data.
- Create a Tablix with that DataSet. The headers in the Tablix will now look odd. As an example the header, "Column_One", will now look something like this: "Column3145234jhasdfOne".
- Save the file on your desktop or other local directory. It will be an RDL file. Close Report Builder.
- Open the resulting RDL file you saved in a text editor, such as Notepad++. You will see XML code.
- Find and Replace your non-sense string: "3145234jhasdf", with the character you want it to display your headers: "_".
- Save the file. Close the text editor.
- Open the file in Report Builder. Your headers should look like you want it.
You can replace more than one type of character by choosing a different non-sense string for each. For ease, keep the string alphanumeric with no spaces.
Context
StackExchange Database Administrators Q#15042, answer score: 3
Revisions (0)
No revisions yet.