The Power Of The Placeholder

Once upon a time in a Business Intelligence Development Studio 2005 Reporting Services solution there liveth a Textbox object which developers could use to put text on a report.  It was a fairly simple object, allowing only two ways of programming the text.

The first and most simple way of the two was to type plain and simple text directly into the box:

SSRS Textbox with simple constant text

And the second, more advanced way, alloweth developers to use an expression to create the text dynamically.  With this they could combine data from several sources into the same Textbox:

SSRS Edit Expression window

Then developers realized that something was still missing.  Text could be created dynamically but they also wanted to optimize the way the text looketh.  So they selected part of the expression and tried to change some font properties.  But alas, they couldn’t.  It was all or nothing:

Text rendered using some font styles in SSRS 2005

Then arriveth the day of the birth of the successor to BIDS 2005.  As the family’s tradition went, it was called the same as its parent.  The only difference was its birth year: BIDS 2008.

And developers started exploring BIDS 2008 and discovereth that the Textbox object had gotten an upgrade.  When editing the content of the textbox, the right-click menu has gotten a new item:

SSRS 2008 Create Placeholder menu item

That’s right, Create Placeholder.  And this was the moment in time when developers started to have fun again.  The placeholder can be given a value through an expression, just like the olden days:

Placeholder Properties - General tab

The Placeholder’s value can be given a format through the Number tab:

Placeholder Properties - Number tab

And a Placeholder’s font can be customized:

Placeholder Properties - Font tab

Now you may ask yourselves, wherein lies the difference with the olden days?

Well, it lies in the fact that several Placeholders and regular constant text can all be combined in the same Textbox!

This is what it looks like in Design time:

SSRS 2008 textbox with placeholders

And rendered in Preview:

SSRS 2008 Preview of textbox content

Powertip: to easily open up the properties of an existing Placeholder, single-click the Textbox to select it, again single-click to edit the content, then double-click a Placeholder to get its properties window.

When reports developed using BIDS 2005 are attached to a 2008 SSRS solution, any expressions in textboxes are acting as a placeholder as well:

Textbox with expression converted to BIDS 2008

And developers liveth happily ever after.

Although not entirely.  Try entering a chemical formula in the textbox.  Indeed, there’s no subscript option in the font settings.  And it doesn’t work through HTML either, as explained in this Microsoft Connect bug report.  It’s probably not as easy as it sounds, but if Word can do it I think so should SSRS.

Small update: a colleague recently had an interesting idea related to the subscript issue.  If subscript is not possible, try putting the numbers in a smaller font than the other characters.  So instead of H2O, it would become H2O.  The subscript version looks like this: H2O.  The workaround doesn’t look as good as with subscript but better than just in regular font size.  (Thanks Bart :-) )


Tags: , , , , ,

  1. jonrgrover’s avatar

    The problem still is that you still have to use a GUI to develop the system rather than being allowed to write code. The new placeholder system makes the SSRS GUI more complex, and since I have trouble using GUI’s for development, I have even less fun than before. Hopefully, someday we will have a reporting system that lets us code reports.


  2. Valentino Vranken’s avatar

    Hi Jon,

    After having seen your blog, I understand that you really don’t like GUIs. So why not code your report then, just like you stated in your comment? After all, an SSRS report is pure XML, well, RDL (Report Definition Language) to be exact, which can be coded using any method of your preference.

    Have a look here to get you started:

    Thanks for your comment!


  3. Bart Hayes’s avatar

    Have you tried the Alignment though? You can’t give different placeholders a different alignment property in the text box, like set one to left and the other to right, they are both take on the last setting. You can put in spaces, but then the alignment doesn’t seem to behave the same in the designer as it does when deployed to a web pabe either.

    I’d be interested to see if anybody has been able to deal with this. I’ve had to make text boxes the full width of the page to avoid merged cells when exporting to Excel and then I find you can’t control the layout of the placeholders in the text boxes very easily.


    1. Valentino Vranken’s avatar

      Hi Bart,

      What version are you using? I was able to get different alignments working inside one textbox. The only “requirement” is that the placeholders are located on different lines. A quick test can be done by adding an empty textbox, insert placeholder one and give it a value, add a carriage return to the textbox and insert placeholder two on that next line, give that a value too and align it differently (for instance right).

      I got this working, but my version is currently 2008 R2, so I’m not sure about 2008.



  4. Bart Hayes’s avatar

    Yes, I’m using 2008 R2, but hadn’t tried placeholders on different lines. I wanted a placeholder at either end of a text box on the same line, as a header row. I ended up placing another textbox over the first textbox at the right end and set the alignment on that, unfortunately the second text box actually does drop to the next line, so it can’t be fooled.

    I tried putting in another placeholder with 30 odd spaces in it between the other two, tried space(n) concatenated to the placeholder value,but again in Report Manager the spaces seem to be ignored. Not a big deal, possibly a missed detail, as the placeholders are a good idea and I imagine they are intended to be self-contained objects.


  5. ganesh dixit’s avatar

    In Fact, a nice article about placeholder.
    Thanks Buddy…


  6. newuser’s avatar

    Thanks a lot. your inputs are really very very helpfull.


  7. Kim’s avatar

    Is there a way to dynamically add a place holder?
    what I’m trying to do is, the number of place holder in my report depends on the amount of data i have. for example, if i have 20 data in a certain field then i should have 20 place holders.


  8. Shweta’s avatar

    Hey Nice Article! It helped me!
    I had requirement of one field should display as plain text as well as HTML in case the type of the record differs!
    The Place holders did wonders here.
    I created two placeholders with expressions with types
    and each had different format to display!
    It works.


  9. maksud gelandangan’s avatar

    If some one wishes expert view regarding blogging and site-building
    after that i recommend him/her to pay a visit this web site,
    Keep up the good job.


  10. Tahapan Bicara Pada Anak’s avatar

    Great blog you have got here.. It’s hard to find excellent writing like yours
    these days. I truly appreciate people like you! Take care!!


  11. job source’s avatar

    Recently I read an article by Michael Neece, on
    in which he states the six explanations why most interviews fail.
    To avoid getting yourself into such a situation, these actors should find other causes of income.
    Glass ceiling defined:The glass ceiling symbolizes the
    discrepancy in pay between men and women.


  12. jobs alert 2019-2020’s avatar

    Recently I read a write-up by Michael Neece, on in that they states the six main reasons why most interviews fail.
    To avoid stepping into this type of situation, these actors should find
    other sources of income. Glass ceiling defined:The glass ceiling symbolizes the discrepancy in pay between men and


  13. Fermin Cayabyab’s avatar

    Oh my goodness! Incredible article dude! Thanks, However
    I am having difficulties with your RSS. I don’t know why I cannot subscribe to it.
    Is there anybody having similar RSS problems? Anybody who knows the
    answer will you kindly respond? Thanx!!


  14. Earl Coronado’s avatar

    With havin so much content and articles do you ever run into any issues of plagorism or copyright infringement?

    My blog has a lot of unique content I’ve either created myself or outsourced but iit appears a lot of it is popping it
    up all over the internet without my permission. Do you know any methods to hepp stop content from
    being stolen? I’d really appreciate it.


  15. website’s avatar

    Often times, the divorce process and custody battle will get worse by having an attorney which is not cooperative.
    If you speak to a litigation attorney you will find a team of co-attorneys with them.
    It will be all your family members which will be put aside without any strategy
    to enforce your last wishes. website

    NY Injury lawyer blog *


© 2008-2019 BI: Beer Intelligence? All Rights Reserved