Re:Column.setPrecision doesn't work?
In <3f6093d7$
XXXX@XXXXX.COM >
XXXX@XXXXX.COM wrote:
Quote
I have some jdbTable's associated with some queryDataSets. I want to
set the precision of some of the columns to two decimal places. I
also want to display some of them as currency. So I do the following:
Column c;
c = queryDataSetMergedMachines.getColumn("NewAnnInvCost");
c.setCurrency(true);
c = queryDataSetMergedMachines.getColumn("SLO2Hr");
c.setPrecision(2);
I find that the setCurrency command works; the column shows up with a
$ and two decimal places. However the setPrecision call does not do
anything at all.
What do I need to do to set the precision on my column?
Thanks
Donna Gresh
Do you want the precision set in the database or for "VIEW ONLY"? If
view only then you maybe need to set that on the jtable's column rather
than the QDS.. If you really want that precision on the data, then you
might look at setting that at the database end if possible.. Lastly, it
may be that the setPrecision is not working due to a subsequent call to
the database that resets the column from the Metadata.. You then would
need to turn of "MetadataUpdate".. (you might even create a custom
provider to enforce this precision during loading..)
John..
--
=============================================
TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
Post all questions and replies to this newsgroup ONLY
For papers on DataExpress, Applets, JSP, and Web Development go to:
www.microps.com/mps/papers.htm
====================================================