VishalMistry
8th March 2016, 17:09
hi all,

can anyone guide me if there is any command in baan to highlight a specific field.

I already know attr.cf = 4 in before.display section but i want to have another command to which i can pass field name which i want highlighted.

please advice.

Vishal

Ajesh
9th March 2016, 05:27
Hello There

You can use cf$ functionality. The Usage of cf$ is given down below.


Syntax:
function string cf$ (long attribute_code)

Description

Deprecated. This function is only supported for character-based windows and its usage is therefore deprecated.

Use this 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).

The following codes are available:

Code Screen Printer
0 normal normal
1 bold bold
2 blinking bold
3 bold blinking bold
4 reverse reverse
5 bold reverse bold reverse
6 blinking reverse bold reverse
7 bold blinking reverse bold reverse
8 underscore underscore
9 underscore bold underscore bold
10 underscore blinking underscore bold
11 underscore bold blinking underscore bold
12 underscore reverse underscore reverse
13 underscore reverse bold underscore bold reverse
14 underscore reverse blinking underscore bold reverse
15 underscore reverse bold blinking underscore bold reverse


Arguments
long attribute_code

Context
This function is implemented in the porting set and can be used in all script types.

Note
If the printer is unable to print in reverse, text is printed in bold instead. Blinking is possible only on ASCII terminals.

Example
| To screen
print cf$(4),"This is reversed printing on the screen",cf$(0)

| To printer
spool.pr.line = cf$(4)&"Printed reverse"&cf$(0)
spool.line()



Based on your condition you can use it as follows


string form.amount

If condition then
form.amount = cf$(1) & form.amount & cf$(0)
|Making the form field Bold
endif



The condition 1 makes the field bold but you need to make it normal again hence we use cf$(0) after form.amount also.

Important Note:
It used to work in Baan IV c4 Character based windows and it used to work in Baan IV GUI too, i am not sure about Baan V and ERP LN. The documentation states that the use is deprecated.