Nezir Zahirović

Crystal reports change report field/cell font color with case/switch conditions

Hi to all visitors of those magnificent blog :))  After some vacation and travelling (South France , Côte d'AzurI saw some beautiful sights and places ) I am back again here in Sarajevo (Bosnia & Herzegovina) and start with my ordinary life :)

In this post  I  will  show  you  how to make some colorfully font result of crystal report cell  according to value of some other cell.
First  thing  we need  to add some cell (store procedure result columns or table columns ) on our crystal report.
Next ,  we need to make a right click on that cell/column and choose  Format Field.
Next, we choose Font tab and in  part color we click on marked button.

Last  thing  to do is  to select Report Fields in opened windows and make some drag & drop of our conditional report field  in bottom part of  windows where we  use our famous case / switch command.

In code part  here  we check if those field contains some of those values 2,1,0  we then change font color of selected report field/cell.

So, in final report we  will see in this  case PDF document some columns cells  with Red,Blue,Black color results.
    Blogger Comment
    Facebook Comment


Post a Comment