Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You are exactly right with your general approach:</p> <blockquote> <p>I need to break apart the string – find the author – bold it – and leave the others as default. Like an array….</p> </blockquote> <p>Sounds like you want to do this at the report level instead of in SQL.</p> <p>If you are using SSRS 2008 or later, where you can use placeholders, then this is how I would accomplish this:</p> <ol> <li><p>Create three calculated fields in your dataset, within the report.</p> <ol> <li><p><strong>LeftOfAuthor</strong>:</p> <p><code>=LEFT( Fields!BigString.Value , Instr( Fields!BigString.Value , Parameters!5aAuthor.Value) - 1 )</code></p></li> <li><p><strong>Author</strong>:</p> <p><code>=Parameters!5aAuthor.Value</code></p></li> <li><p><strong>RightOfAuthor</strong>:</p> <p><code>=RIGHT( Fields!BigString.Value , LEN(Fields!BigString.Value) - Instr( Fields!BigString.Value , Parameters!5aAuthor.Value) + LEN(Parameters!5aAuthor.Value) )</code></p></li> </ol></li> <li><p>Now put three placeholders into the text cell you need this displayed within. Set each to refer to one of these calculated fields, in order.</p></li> <li>Select the middle placeholder (for Author) and bold it.</li> </ol> <p>The formulas above presume that the author name has an exact match somewhere in the field. You'll need to add error handling if it might not be. They were not tested in any way, so may need some tweaking.</p> <hr> <p>Some alternate approaches include breaking the string up in SQL and/or enconding the string with HTML <code>&lt;b&gt;&lt;/b&gt;</code> tags for display, then setting SSRS to display it as HTML.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload