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?
Thanks
How to avoid line wrap
(10 posts) (4 voices)-
-
This might be what you are going for...
SELECT 'dbr.colstyle','columnname','[width: 150px;]';
<-- increase/decrease the width as you see fit -
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 -
Thanks!
-
Hi,
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
union
select 2 as errId, 'abcd' + char(13) + char(10) + ' fghe' as errTxt
union
select 3 as errId, 'abcd' + char(13) + char(10) + ' fghe' as errTxt -
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 -
errId errTxt
1 abcd fghe
2 abcd fghe
3 abcd fghein one line
i want:
errId |errTxt
---------------
1 |abcd
| fghe
-------------
2 |abcd
| fghe
--------------
3 |abcd
| fghe -
i want that column errtxt print like:
"abcd
___fghe" -
Hi,
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 Mozilla.org.
--
myDBR Team -
thank
Reply
You must log in to post.