Tip: How to format a column value of a Report programmatically?

Ok in one of my reports, I had to format the column depending on the value of the column. For example, I had to make column bold if the value of the column is greather than 0.

You can do this by adding a formula. Follow these steps:

Right click on field (column) you want to make bold and select Format Field and go to Font page in the Format Editor. Click on Formula sign next to the Style drop down and write the following formula:

If columnName > 0  Then
    crBold
Else
    crRegular

Using similar process, you can change the font, color, size and other properties of the column text. For example, if you want to make the column color to red, you create a formula for the Color field and return Red if value is greater than 0, else return black.

Up Next
    Ebook Download
    View all
    Learn
    View all