none
How can I Dynamically change the font properties in an rdlc? RRS feed

  • Question

  • Is there a way to change the font values dynamically in an rdlc?  I have a field in my dataset called bolBold.  If true, I want that record and only that record bolded on the report.  I've tried to change the expression of the FontWeight property of a textbox in the designer to use = iff(bolBold,Bold,Normal), but that does not work - I get a compilation error that Bold is not declared. 

    Your help is appreciated.

     

    Thursday, May 29, 2008 2:01 PM

All replies

  • I can see a couple options for you.  The easiest one would be to declare a boolean parameter (say ShowBoldParameter) and when the report is showing whether or not something is bolded will be based on the parameter setting.  The other option would be to completely manipulate the .rdlc files xml and set what you want to be bolded within the xml file and then loaded the .rdlc file onto the reportviewer dynamically.  I would definitely do the first option...

    Chris
    Saturday, May 31, 2008 11:38 PM