From: William C. <bc...@cb...> - 2006-03-29 14:22:31
|
$whatever.to_f does it. (the value may have fractional values). The value is always numeric, as the fields being added are defined as "DECIMAL not NULL" in the database. I was using sprintf to apply formatting, but using the display format attributes is much better solution. Thanks for the help. Jim Menard wrote: > William, > > >>Sorry, these are not "real" field names; symbolic place holders with >>more meaning than the real field names would have to anyone not working >>in the industry. The real filed names have no - or _ characters. > > > Then could the value be non-numeric? Try forcing the value of the > variable to be an integer > > sprintf("%d", $whatever.to_i) > > or try just > > $whatever.to_i > > if you don't need any special formatting (except for what the > DataVision field's format string gives you). > > Jim > -- > Jim Menard, ji...@io..., jim...@gm... > http://www.io.com/~jimm > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 > _______________________________________________ > DataVision-users mailing list > Dat...@li... > https://lists.sourceforge.net/lists/listinfo/datavision-users -- /* ================================================================= */ William E. Colls Tel 613 225 6566 ext 2320 Manager Fax 613 225 6651 Applications Development 18 Auriga Drive Lotteries Group Ottawa Ontario Canada Canadian Bank Note Company Limited K2E 7T9 |