Question
9
Replies
4640
Views
Posted: May 13, 2016
Last activity: June 1, 2016
Closed
Is it possible to modify Report Viewer column header alignment and text wrapping?
I have two issues with the Report Viewer column headers:
1. The column header text is always left-aligned, which is never in line with the numeric data that is in its column.
- This leads to much confusion as to which header represents which content
- I would like to be able to right-align the header text, or at least have it default to Centered to minimize the confusion.
- <ENHANCEMENT REQUEST> Ideally, header text should automatically align with its contents, or better yet, have the Caption have its own Settings/Properties to be editable.
2. The column header text is always only displayed on a single row and truncates if wider than the column. I would like to enable text wrapping instead of truncation as we need to see the full text of the caption.
- We have a number of columns that have similar captions, but once they get truncated (with ellipsis...) if the column isn't wide enough, we can't tell which column is which, both titles look the same.
In general, what you need to do is find out (e.g., through IE Developer Tools) what the class is of the element you want to change styles on. For instance, in the case of the column headers for this report:
The class you need to specify the style for is this:
You need to override this somewhere in your application's CSS/skin to set the text alignment to what you want. You can set the word-wrap you want as well.