[Migrated content. Thread originally posted on 10 December 2004]
Hi everybody.I'm trying to implement Crystal Reports ActiveX DRC in our ERP application and I've found a problem when passing dates. We are completely newbies in Windows programming (as you'll see soon) and I think that is the main trouble.
Well, once (not in depth) reviewed the Acucobol ActiveX syntax, I make the following assumptions:
a) Passing a Variant datatype to an ActiveX control implies the use of a variable, USAGE HANDLE OF VARIANT, which will be filled through C$SETVARIANT routine.
b) Acucobol automatically converts data passed by using a PICTURE basis. That is, a PIC X(n) variable will be passed as VT-BSTR, a PIC 9(n) as VT-I4 and a PIC 9(n)V9(n) as VT-R8 respectively.
c) Since Acucobol 6.20 is possible to specify "AS VARIANT_TYPE" on individual variables in the INQUIRE and MODIFY verbs.
Right until here (I think).
The problem comes when I try to pass a date variable to a VT-DATE variant type. As Acucobol does not provide automatic conversion for this type I don't know how to pass the date.
i.e. I have a PIC 9(08) variable in Acucobol in YYYYMMDD format. How can i translate this value to VT-DATE format ? Is there any equivalente data type (VT-I4, VT-R8, ...) ? What is the internal datatype structure of a VT-DATE Variant ?
Sorry. A lot of questions.
Regards.
P.S. The concept could be too applicable to CURRENCY (VT-CURRENCY) datatype.



