web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

How to does one bold a text box in RDLC based on a boolean passed in the report data?

(0) ShareShare
ReportReport
Posted on by

I am attempting to conditionally bold lines on a report based off a boolean variable (Bold) that I pass it.

Currently I have tried all of these in the FontWeight Expression for the text box:

=iif(Fields!Bold.Value,"Bold","Normal")

=iif(Fields!Bold.Value=1,"Bold","Normal")

=iif(Fields!Bold.Value=TRUE,"Bold","Normal")

Any help would be appreciated.

Thanks in advance :)

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi,

    Refer Report 1 for the details. Such boolean based bold expression  is available in the same.

    Also refer following link for the exact details.

    msdn.microsoft.com/.../dd339037(v=nav.90).aspx

    Hope this helps.

  • Community Member Profile Picture
    on at

    What do you mean by Report 1?

    That is the site that I followed, but the code does not work for me.

  • Suggested answer
    Community Member Profile Picture
    on at

    I mean Standard Report ID one (1) = "Chart of Accounts" report, where similar code already available in the report and working fine.

  • Suggested answer
    Community Member Profile Picture
    on at

    In Report ID - 1, It is referred as follow.

    =IIF(Fields!CheckAccType.Value,"Normal","Bold")

    Try with this.

    I believe, you are setting up the BOLD variable at the right trigger. Check with fixed value (instead of Boolean) and see if it is working properly.

  • Verified answer
    Community Member Profile Picture
    on at

    That's what I tried originally.

    I did some trial and error, and apparently it won't bold 7pt font, but it will 8pt. This is was the root of my issue. Thanks for pointing me in the right direction!

  • mmv Profile Picture
    11,471 on at

    Hi,

    It's not that 7pt font won't format to Bold.  it's just that the weight of the Font may feel that it's not bold.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans