Hello, i'm working with DataTables and Grids.
I Define DataTable columns in screen painter, bind grid to datatable e fill values of datatable with SetValue Method.
I define numeric columns with decimal of ft_Float type.
The problem is the number of decimals i see in these columns: i made some test and i've discovered that it corresponds to the 'Amounts' setting of the general settings form! Always..!
I need to put quantities in these columns not amounts.
I need to see quantities with 6 decimals and amounts with 2.
How can i do it if datatable only have ft_Float to work with decimals and it only 'listens' to 'Amounts' ?
I'm using SAP B1 2005A SP01 PL 36.
i came across the same problem and the way I solved it is by manipulating the number of decimals in the query itself, something like this ...
SELECT Field1, CAST(CAST(U_Amount AS DECIMAL(10,2)) AS VARCHAR) 'U_Amount'
Notice the first CAST Function returns the amount in the decimal format desired and then the second one converts it to a string. It solve my problem.
hope it helps