Aller au contenu principal

Set parts of text to bold in Rich Text control

Commentaires

5 commentaires

  • Ali VanSickle

    Nico Burgerhart 
    I am also looking for the same functionality. Were you able to find a workaround?

    Thanks!

    0
  • Nico Burgerhart

    Ali VanSickle A workaround is to use the option to load a RTF file, where you have applied the formatting in bold in the file.

    This works in Reporting on-premises. In SaaS Reporting I had a different issue not being able to uplad a RTF file.

    0
  • Gareth Evans

    Hi Nico Burgerhart & Ali VanSickle 


    Thanks for bringing up this RTF formatting challenge. I believe you could accomplish this using configured Expressions on your rich text control. Having dug into the expressions documentation, and built a few reports in my time, let me suggest a few potential approaches we could explore:

    1. You might be able to leverage string concatenation with formatted segments:

    [FormattedSection1] + ' ' + [FormattedSection2] + ' ' + [FormattedSection3]

    2. For dynamic scenarios where certain segments need bold formatting, we could try combining Iif() with concatenation:

    'Regular text: ' + [TextField] + Iif([IsBoldField] == True, ' <EMPHASIZE>' + [BoldSection] + '</EMPHASIZE>', [BoldSection])

    3. Another angle would be splitting your RTF content into separate fields that maintain their formatting:

    Concat([RTFHeader], NewLine(), [RTFBody], NewLine(), [RTFFooter])

    I should mention that while these are approaches based on our expression syntax capabilities, I know this isn't as straightforward as it was in Reporting 4. These are somewhat experimental suggestions - I'd be really interested to hear if you've tried any particular approaches already and what results you've seen.

    0
  • Ali VanSickle

    Thanks! 

    I was able to complete this by creating a calculated string string field with the following expression:

    '{\rtf1\ansi\deff0 {\fonttbl {\f0 Tahoma;}}\f0\fs20{\b DIVISION OWNERSHIP:} [DIVOWNER]\line{\b GL:} [GL]\line{\b CUT INTERVAL:} [CUTINTERVAL]\line{\b CUT INSTRUCTIONS:} [CUTINSTRUCTION] \line}'

    Then I added the RTF control and referenced the calculated field above.

    1
  • Gareth Evans

    AHa, glad you found success and thanks for sharing your specific syntax, Ali!

    0

Vous devez vous connecter pour laisser un commentaire.