project QadFinancials > class BAccountingInterface > method FillProDsFormat

Description

This method is used to generate prodataset for Format Document. This document is used for user to get a general idea of the other reports.


Parameters


icFileNameListinputcharacterFile Name List(Selected files on User Interface).
ohFormatoutputhandleHandle of Format Report Prodataset.
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BAccountingInterface.BulidProDataSet


program code (program3/baccountinginterface.p)

assign oiReturnStatus = -98.
/* Empty temp-table which will be used later */
empty temp-table tFormat.
/* Initialize the integer variable for loop */
assign vii = 1.
/* Constructure the temp-table tFormat */
create tFormat.
repeat while vii <= num-entries(icFileNameList,chr(2)):
    if vii mod 2 = 1
    then do:
         /* AccntBook */
         if entry(vii,icFileNameList,chr(2)) = {&EXPORTREPORTCODE-DZZB}
         then assign tFormat.tcAccntBook = entry(vii + 1, icFileNameList,chr(2)).
         /* ChartOfAccnt */
         else if entry(vii,icFileNameList,chr(2)) = {&EXPORTREPORTCODE-KJKM}
         then assign tFormat.tcChartOfAccnt = entry(vii + 1, icFileNameList,chr(2)).
         /* Department */
         else if entry(vii,icFileNameList,chr(2)) = {&EXPORTREPORTCODE-BMXX}
         then assign tFormat.tcDepartment = entry(vii + 1, icFileNameList,chr(2)).
         /* Entity */
         else if entry(vii,icFileNameList,chr(2)) = {&EXPORTREPORTCODE-WLDW}
         then assign tFormat.tcEntity = entry(vii + 1, icFileNameList,chr(2)).
         /* ProjectData */
         else if entry(vii,icFileNameList,chr(2)) = {&EXPORTREPORTCODE-XMXX}
         then assign tFormat.tcProjectData = entry(vii + 1, icFileNameList,chr(2)).
         /* AccntBalance */
         else if entry(vii,icFileNameList,chr(2)) = {&EXPORTREPORTCODE-KMYE}
         then assign tFormat.tcAccntBalance = entry(vii + 1, icFileNameList,chr(2)).
         /* GLVoucher */
         else if entry(vii,icFileNameList,chr(2)) = {&EXPORTREPORTCODE-JZPZ}
         then assign tFormat.tcGLVoucher = entry(vii + 1, icFileNameList,chr(2)).
         /* BalanceSheet */
         else if entry(vii,icFileNameList,chr(2)) = {&EXPORTREPORTCODE-Q_ZCFZ}
         then assign tFormat.tcBalanceSheet = entry(vii + 1, icFileNameList,chr(2)).
         /* IncomeStatement */
         else if entry(vii,icFileNameList,chr(2)) = {&EXPORTREPORTCODE-Q_LR}
         then assign tFormat.tcIncomeStatement = entry(vii + 1, icFileNameList,chr(2)).
    end. /* if vii mod 2 = 1 */
    assign vii = vii + 1.
end. /* repeat while vii <= num-entries(icFileNameList,chr(2)): */

/* Use prodataset to encapsulate the temp-table */
/*create dataset ohFormat in widget-pool "non-persistent".
ohFormat:set-buffers(buffer tFormat:handle).
ohFormat:name = {&EXPORTREPORTCODE-GSSM}.*/


create dataset ohFormat in widget-pool "non-persistent". 
create buffer vhFormat for table buffer tFormat:handle in widget-pool "non-persistent".
ohFormat:set-buffers(vhFormat).
ohFormat:name = {&EXPORTREPORTCODE-GSSM}.

/* ohFormat:WRITE-XML("file", "C:\Develop\wht\Client\testGSSM.xml", YES, ?, ?, NO, NO). */

if oiReturnStatus = -98
then assign oiReturnStatus = 0.