Hi, does anyone know how to format fields in a report, so that they show also the plus sign, if the value is positive? Trying <sign,1> in the Format property didn’t helped. Wolfgang
onaftergetrecord var myformattednumber : text if (mynumber>0) then myformattednumber:=’+’+FORMAT(’%1’,mynumber) else myformattednumber := FORMAT(’%1’,mynumber); And then use myformattednumber as field variable – Alfonso Pertierra apertierra@teleline.es Spain
Or you may place two controls on your report with the same size and position properties (i. e. one over another) defined as follows: Control #1: SourceExpr = ‘+’ + FORMAT(’%1’, MyValue), BlankNumbers = BlankNeg Control #2: SourceExpr = FORMAT(’%1’, MyValue), BlankNumbers = BlankZeroAndPos Edited by - karel2 on 2001 May 29 11:36:48
My thoughts exactly! This keeps the formatting where it belongs - in the Section Designer. You might want to keep the SourceExpression as it is, though, and specify ‘+’ as the Format property of the ‘positive’ text box. This leaves the Name (and therefore the Caption) of the control intact. Check out the on-line help for the Format property for more info on the available format specifiers (such as ). Edited by - jhoek on 2001 May 29 12:34:40
Thanks to you all, formating the code in CAL or Sections has its Pro’s and Con’s. In CAL you see everything that happens, so in year an other person will know about it. In the Section you don’t see that, but in the solution provided by Jan the SourceExpression keeps untouched, so i decided for that. Thank you again, Wolfgang