How to avoid line wrap

(10 posts) (4 voices)


No tags yet.

  1. chadwickhung, Member

    I found that some of my result set will automatically line-wrap according to the width of the heading if there are space character in the result, but some won't. How to control it?

  2. nsepetys, Member

    This might be what you are going for...

    SELECT 'dbr.colstyle','columnname','[width: 150px;]'; <-- increase/decrease the width as you see fit

  3. myDBR Team, Key Master

    By default, browsers try to show as much data as possible by doing line-wrap when applicable. You can turn off the line-wrap with CSS white-space property. You can apply the CSS rule to individual column (dbr.colstyle) or to whole result:

    select 'dbr.css', '.nowrap {white-space:nowrap}';
    select 'dbr.resultclass', 'nowrap';
    select id, data...

    myDBR Team

  4. chadwickhung, Member


  5. ziuras, Member

    myDBR can you help me with nowrap.

    this example did not work:

    select 'dbr.css', '.nowrap {white-space:nowrap}';
    select 'dbr.resultclass', 'nowrap'; select 1 as errId, 'abcd' + char(13) + char(10) + ' fghe' as errTxt
    select 2 as errId, 'abcd' + char(13) + char(10) + ' fghe' as errTxt
    select 3 as errId, 'abcd' + char(13) + char(10) + ' fghe' as errTxt

  6. myDBR Team, Key Master

    What is the output when you say it does not work? Do you want to show the line breaks or remove them?

    The white-space:nowrap CSS definition collapses white space, but suppresses line breaks (text wrapping) within the source.

    myDBR Team

  7. ziuras, Member

    errId errTxt
    1 abcd fghe
    2 abcd fghe
    3 abcd fghe

    in one line
    i want:
    errId |errTxt
    1 |abcd
    | fghe
    2 |abcd
    | fghe
    3 |abcd
    | fghe

  8. ziuras, Member

    i want that column errtxt print like:

  9. myDBR Team, Key Master

    the 'white-space:nowrap' does exactly the opposite i.e. prevents line wraps.

    To keep the white-spaces (spaces & line feeds), you can use:

    select 'dbr.css', '.nowrap {white-space:pre}';
    select 'dbr.resultclass', 'wrap';

    See documentation for white-space from

    myDBR Team

  10. ziuras, Member



You must log in to post.