hello,
please can u tell me the how to set the format property or function to achieve a parenthesis around a negative decimal figure 8-[ appearing in a textbox with sourceexpression set to a field in a table. in short is this possible ? "(-99.888)"
thanks in advance
gd
Regards,
GD
0
Comments
Something like:
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
RIS Plus, LLC
to use this place the function with the decimal field in the SourceExpr, like :
I think you must use a global text-variable, fill it up in the OnAfterGetRecord-trigger.
Something like:
Code:
txtTheText := FORMAT("The Decimal");
IF "The Decimal" < 0 THEN
txtTheText := '(' + txtTheText + ')';
Thanks To Denster,Made in Holland and especially Kriki very impressive.
GD
If it is a Form output then look at the TextBox Cal/Code, all you need is the following in the OnFormat Trigger
DecDataControl - OnFormat(VAR Text : Text[1024]; )
IF (DecData < 0) THEN
Text := '('+Text+')';
You can Also update the font color to Red as well within this trigger
DecDataControl - OnFormat(VAR Text : Text[1024]; )
IF (DecData < 0) THEN BEGIN
Text := '('+Text+')';
CurrForm.DecDataControl.UPDATEFORECOLOR(255);
END ELSE
CurrForm.DecDataControl.UPDATEFORECOLOR(0);
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com