x

How to make a tablix cell wrap

Hello,

In the table in my SSRS report there is a field that can contain very long strings. These strings do not contain any spaces.

I would like to column that this field is displayed in to remain a fixed width. If the field text is too wide, I want the text to be wrapped in the cell and display on the next line.

How can this be done in SSRS?

For example, when the field in Col1 contains a string such as 1234567890, I want SSRS to display it like this:

Col1
123456
7890
more ▼

asked Mar 23 '11 at 09:24 AM in Default

xnl28 gravatar image

xnl28
895 54 58 61

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

I believe that this behaviour could be controlled by the CanGrow property of the column. I am not sure what this eventually spells out, but if it does not work then the alternative way to control the wrapping of the long text is by the style sheet. Here is the sample showing how to make the long spaceless word break in plain html table:

<table 
    style='table-layout:fixed;width:100px;
    border:black 1px solid;border-collapse:collapse'>
    <tr>
        <td style='border:black 1px solid;word-wrap:break-word;'>
            Thiswordisjusttooloongtofitsoitneedstobreak
        </td>
    </tr>
    <tr><td>b</td></tr>
</table>
Oleg
more ▼

answered Mar 23 '11 at 10:00 AM

Oleg gravatar image

Oleg
15.9k 2 4 24

I tried this but it seems to be not a correct solution.SSRS not support all css properties.It works in HTML page but not a workaround for SSRS expression
Aug 01 '12 at 09:36 AM prafull.yeole
(comments are locked)
10|1200 characters needed characters left
Double click on the filed value to open place holder property window and under general tab Change Markup type from "none-plain text only" to "HTML -Interpret HTML tags as Style"
more ▼

answered Jan 20 at 07:07 PM

Mpubuse gravatar image

Mpubuse
1

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x562
x535

asked: Mar 23 '11 at 09:24 AM

Seen: 3155 times

Last Updated: Jan 20 at 07:07 PM