none
Cannot lock down the width of a column

    Question

  • I have a report that someone else created and I'm modifying it.  The columns in the tablix grow if the expression is longer than what it was layed out/designed for in Visual Studio.  I've set the CanGrow property everywhere I could find it to false, and unchecked the Sizing Options in the textbox properties. 

    But the size of the column would expand to 2 feet if there was enough text in the expression to allow for that (and no spaces in the expression). 

    So I want the column, for example, to be 2 inches wide and that's it, irrespective of what the expression is.  Any thoughts or comments, appreciated, thanks.

    Friday, September 20, 2013 12:11 AM

All replies

  • I have tried setting the can grow to false and text is getting truncated once it reaches to the size of the column. Not sure why its not working in your case.

    Please try once again by setting the size of column as you want and can grow property to false. Text in that column should get truncated if the size is greater. 


    Nilima

    Friday, September 20, 2013 5:50 AM
  • I'm having all kinds of trouble keeping the column width fixed running SharePoint 2010 integrated mode.  When I preview the report in Visual Studio 2010 with the "can grow" property to false, the column width is as expected and the text gets truncated.  But when I deploy to SharePoint the column width can vary significantly depending on the amount of text in the box.  This happens with an existing report and a new one.

    Here's my goal, the best way that I can explain it.  In Visual Studio if you right click on the report and select View -> Ruler, let's say the width of the column is 1 inch.  Again, if I preview the report in Visual Studio (with the can grow property set to false), that is exactly what I get -- 1 inch, no more no less and irrespective of the amount of text in the box.  When I deploy to SharePoint 2010 to a document library or to a reports library, the column width can vary by at least double, it simply is not fixed.

    I'd really be interested in anyone else has seen this.  Thanks.

    Friday, September 20, 2013 2:36 PM
  • Hi Bob,

    It’s really odd that the column width is not fixed when you deploy the report to the report server that runs in SharePoint integrated mode. In Reporting Services, a width of a column/textbox/tablix is fixed, and the CanGrow and CanShrink properties only affect the column/textbox height. 

    No matter whether you view the report from a SharePoint library or a SharePoint page that contains a Reporting Services Report Viewer Web Part, the column width of a tablix should be fixed. Were the reports eve displaying correctly before? Please insert a rectangle into the tablix cell and check the issue again. You could also check the issue by navigating to the report server.

    If you also have a native mode report server, could you check this issue on report manager?

    Regards,
    Mike Yin

    If you have any feedback on our support, please click here


    Mike Yin
    TechNet Community Support

    Monday, September 23, 2013 4:44 AM
  • Mike,

    <<No matter whether you view the report from a SharePoint library or a SharePoint page that contains a Reporting Services Report Viewer Web Part, the column width of a tablix should be fixed.>>

    Thanks for the response, but based on my tests, which includes creating a new report, that is simply not the case, particularly if the expression in the column has no spaces in it.

    I'd be interested if anyone else has tested whether the column width is fixed in an SSRS integrated report that has say just two columns in it, and placed on an 8.5 inch background page.

    Please refer to the images below, the first one is how the column "Last Mod By CO" appears in SharePoint, the second one is how it appears in Visual Studio.

    --Bob Harford



    • Edited by Bob Harford Monday, September 23, 2013 9:14 PM
    Monday, September 23, 2013 3:22 PM
  • This is a known issue (for a visual of the problem, see the two images above), a solution is provided by Paul Shkurikhin, the SharePointalist here:  http://blog.sharepointalist.com/2009/05/ssrs-column-width-long-text-auto-size.html

    Here is the SharePointalist's description of the same problem:  Recently I got a weird problem building some reports with SSRS 2008. The column width started to automatically resize based on content, while all columns width are fixed in SSRS by design. The cause of this was long words and long URLs in these fields, which were not able to wrap.




    • Edited by Bob Harford Tuesday, September 24, 2013 4:27 PM
    Tuesday, September 24, 2013 1:57 PM