Home > BaaN, How to, Infor > How To #3 – highlight (bold/underline) fields in Baan reports programmatically ? #baanhowto

How To #3 – highlight (bold/underline) fields in Baan reports programmatically ? #baanhowto

How to highlight fields in Baan reports programmatically?

Lot of times, there is a requirement to conditionally underline / bold / bold&underline  a specific report field. This can be achieved very easily in BaaN using the function cf$()

string cf$( long attribute_code ) 

This pre-defined function is used to send a control code to the current window or printer. All characters after the command are printed or displayed in the font associated with the control code. To reset the font to normal, call cf$(0).

Some of the commonly used  codes are

Code Screen Printer
0 normal normal
1 bold bold
8 underlined underlined
9 bold & underlined bold & underlined

Lets take an example which will make the usage more clear
eg. Make the project bold & underlined if the project is not active.

In the code snippet below, note that domain “tccprj” not used, instead “tcmcs.str8” is used.Assuming the environment is BaaN IV, the domain length for project is 6, unlike 9 in LN.The domain used for the variable is of length 8. This is to accomodate 2 more characters for making the project appear bold & underlined in the report and to avoid truncation of characters.

domain tcmcs.str8 r.cprj

|* Assuming the field will be printed in detail layout

         if not PROJECT.ACTIVE then

                   r.cprj = cf$(9) & PROJECT & cf$(0)


                   r.cprj = PROJECT


Quick Submit

Categories: BaaN, How to, Infor Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: