locked
Double line spacing in SSRS RRS feed

  • Question

  • How do I achieve double spacing of lines in a large text box in SSRS?

    Thanks
    Wednesday, March 3, 2010 1:36 PM

Answers

  • Hi bagman3rd,
    You want to double the space of lines in a textbox in SSRS.As we know ,there are several kinds of Line Spacing in the word document ,like single,1.5 lines ,double, multiple... While there is no such a property in SSRS . So you need to do the converting by yourself.

    For example, textbox's expression is:
    It is sunny today
    I want to swim!

    There is only a single line space, so you can do like this to double it:
    Click the textbox's Expression, then change it to
    ="It is sunny today" + vbCrLf  +vbCrLf  + "I want to swim!"
    then the document will be displaced like this which you want to see,

    It is sunny today

    I want to swim!

    BTW: you need to specify where you want the text to start from a new line and ensure the textbox’s  CanGrow property is set to true
    Simply use the visual basic constant vbCrLf which performs  Line Feed functions that makes text come after it to start in a new line. Add more vbCrLf to add more blank lines.

    Best regards!

    challen Fu

     

    Friday, March 5, 2010 8:42 AM

All replies

  • This seems like it should be a simple problem to fix.  No one knows how to achieve double line spacing in a text box in SSRS?  One co-worker is telling me that it cannot be done.  Really???
    Wednesday, March 3, 2010 3:31 PM
  • Hi bagman3rd,
    You want to double the space of lines in a textbox in SSRS.As we know ,there are several kinds of Line Spacing in the word document ,like single,1.5 lines ,double, multiple... While there is no such a property in SSRS . So you need to do the converting by yourself.

    For example, textbox's expression is:
    It is sunny today
    I want to swim!

    There is only a single line space, so you can do like this to double it:
    Click the textbox's Expression, then change it to
    ="It is sunny today" + vbCrLf  +vbCrLf  + "I want to swim!"
    then the document will be displaced like this which you want to see,

    It is sunny today

    I want to swim!

    BTW: you need to specify where you want the text to start from a new line and ensure the textbox’s  CanGrow property is set to true
    Simply use the visual basic constant vbCrLf which performs  Line Feed functions that makes text come after it to start in a new line. Add more vbCrLf to add more blank lines.

    Best regards!

    challen Fu

     

    Friday, March 5, 2010 8:42 AM
  • use padding .this may help you

    thanks and regards

    Razzak
    Razzak Sayyed
    Friday, March 5, 2010 8:50 AM
  • You can set the LineHeight property of the textbox to adjust line spacing, This is in font point, so if you're using 10pt font, set LineHeight to 20pt for double spacing. Unfortunately it appears to be a bug (or feature?) that this property only affects the report when it's exported to HTML format--seriously, try it. Any other rendering format will simply ignore this property.

    If you think this is silly, like I do, vote it up here as something MS should fix:

    https://connect.microsoft.com/SQLServer/feedback/details/557661/line-spacing-options-for-ssrs?wa=wsignin1.0

    Friday, October 1, 2010 4:25 PM
  • Yep, like most of SSRS I certainly think this is silly.  Unfortunately I can't up vote since either the link is broken or the Connect service is down.

    Tuesday, January 28, 2014 2:09 PM
  • Terrible answer, unless of course, you only need a report that discusses the weather or swimming. (In which case, just use Word for a static document.) What if the textbox contains dynamic data? Which would be typical of most SSRS report builder usage, I would expect.

    A better way to workaround this Microsoft oversight would be to use an expression to increase the font-size on any spaces in the text box, or just manually do it.

    Just make sure you document what you've done to get around this ridiculous deficiency as the next guy working on your report won't know what the hell you did to get it to work.

    • Edited by S Robichaud Thursday, November 26, 2015 9:31 PM add info
    Thursday, November 26, 2015 9:24 PM
  • Thank you for this!

    I'm using SSRS 2005.  I have 9pt text and I set the LineHeight property to 16pt.  After deploying the report to the web server, it rendered perfectly in html, appearing exactly as the "double line-spacing" effect I wanted.

    The only "problem" is that the line spacing isn't preserved when exporting to a pdf from within SSRS itself, but the line spacing is preserved when printing the report to a pdf from IE11.

    Even after exporting the report to the SSRS 2012 web server, it still doesn't preserve the line spacing when exporting to a pdf from within SSRS.  So the way to preserve the line spacing in a pdf remains printing the report to a pdf from IE11.

    Saturday, May 13, 2017 5:29 PM