Hey, UV 10.2 / PIOPEN Flavor
I'm trying to resolve an erratic issue with totaling on some reports, where it runs the column out to 9 decimals. It only happens when we apply the 'MD2' conversion with an OCONV, rather than using the Conv field in the DICT item. And, it does not happen consistently. Why, then, do it this way? Because we must decide whether to present a foreign currency amount, or a USD amount. We store the foreign currency amount in its output format, but USD in its internal format. Our accountants want the AR Amount to appear in the same column, regardless of currency code. Consider the DICTs: This is what formerly appeared on reports, before handling other currencies: Top of "D10" in "DICT CRJ", 6 lines, 51 characters. 001: D ACCOUNTS RECEIVABLE AMOUNT 002: 10 003: MD2 004: A/R-TOTAL 005: 10R 006: S Bottom. For diagnostic purposes only, to demonstrate there is no embedded decimal in the data: Top of "D10.RAW" in "DICT CRJ", 6 lines, 52 characters. 001: D AR AMT WITH NO (02/04/08,RBH) 002: 10 003: 004: AR-TOT RAW 005: 10R 006: S Bottom. A simple form of the actual OCONV, without the conditional IF: Top of "D10.OCONV" in "DICT CRJ", 20 lines, 542 characters. 001: I AR AMT - Oconv'd (2/5/8, rbh) 002: OCONV(D10,"MD2") 003: 004: AR-TOT OCONV 005: 16R 006: S What is used now in the report; We present field 10 if USD, or field 26 (already converted) otherwise: Top of "AR.TOT.USD.FRGN" in "DICT CRJ", 20 lines, 1,407 characters. 001: I ACCOUNTS RECEIVABLE AMOUNT USD / FGRN (JMK, 15 MAR 2007) 002: IF D22 = "USD" OR D22 = "" THEN OCONV(D10,"MD2") ELSE D26 003: 004: A/R-TOTAL 005: 10R 006: S Top of "D26" in "DICT CRJ", 6 lines, 57 characters. 001: D FOREIGN ACCOUNTS RECEIVABLE AMOUNT 002: 26 003: 004: A/R-TOTAL 005: 10R 006: S Bottom. The output: LIST CRJ TOTAL D10 TOTAL D10.RAW TOTAL D10.OCONV TOTAL AR.TOT.USD.FRGN TOTAL D26 ID.SUP DET.SUP A/R-TOTAL. AR-TOT RAW AR-TOT OCONV.... A/R-TOTAL. A/R-TOTAL ========== ========== ================ ========== ========== nnnnnn86.5 nnnnnn8655 nnnnnn86.5499989 nnnnnn49.8 35.64 5 399989 Beaucoup records listed. [actual figures masked] Thanks for any insights offered, or diagnostic steps. -Baker ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/