Auto Column Width in Headers

(3 posts) (2 voices)
  1. rpark, Member

    Hi,
    I have many reports with many columns per report. This means my reports typically end up being the entire page width in the browser.

    I've noticed that when this occurs, the column's text gets smushed together to fit as much as possible on one page.

    However, I'd rather have the column auto-fit its header text, instead of making it compact. It's OK for the page to scroll horizontally, it's expected.

    How can I automate making the header text not wrap and increase the column widths accordingly?

    Thanks

  2. myDBR Team, Key Master

    If a HTML table is too wide for a page, by default, browsers try to refit the table to the visible area by collapsing sequences of white spaces. You can tell browser not to do that by using the CSS white-space-property.

    Usually it's the data that is wide (apply the CSS to td-tag or if your result set may be empty, you can also apply it to header th-tags.

    select 'dbr.css', '.rstable td, .rstable th { white-space: nowrap }';

    or if you want to make this a system wide preference, add the definition to userstyle.css.

    --
    myDBR Team

  3. rpark, Member

    Thank you very much for this suggestion, I appreciate how MyDBR's so flexible!


Reply

You must log in to post.