project QadFinancials > class BCDocumentReport > method SetDataItemsBasedOnFilterTT


Parameters


oiCCollectionNumberoutputinteger
otCDocumentCreationDateFromoutputdate
otCDocumentCreationDateTilloutputdate
otCDocumentDueDateFromoutputdate
otCDocumentDueDateTilloutputdate
olCDocumentIsOpenoutputlogical
oiCDocumentNumberFromoutputinteger
oiCDocumentNumberTooutputinteger
oiCDocumentPrePrintedNumberFromoutputinteger
oiCDocumentPrePrintedNumberTooutputinteger
ocCDocumentReferenceoutputcharacter
ocCDocumentStatusoutputcharacter
ocCDocumentSubTypeoutputcharacter
olCDocumentTimesPrintedoutputlogical
oiCDocumentYearoutputinteger
ocCreditorCodeoutputcharacter
ocCurrencyCodeoutputcharacter
ocPaySelCodeoutputcharacter
olIncreaseCDocumentTimesPrintedoutputlogical
olAssignCDocumentPrePrintedNumoutputlogical
oiStartCDocumentPrePrintedNumoutputinteger
oiSkipCDocumentPrePrintedNumoutputinteger
oiBankPayformatIDoutputinteger
ocPrintTypeoutputcharacter
ocCreditorFromBRNameoutputcharacter
ocCreditorToBRNameoutputcharacter
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BCDocumentReport.CDocumentReportAll


program code (program3/bcdocumentreport.p)

assign ocCDocumentReference = ?
       ocCDocumentStatus    = ?
       ocCDocumentSubType   = ?
       ocCreditorCode       = ?
       ocCurrencyCode       = ?
       ocPaySelCode         = ?
       ocCreditorFromBRName = ?
       ocCreditorToBRName   = ?.
for each tFilter:
    case tFilter.tcBusinessFieldName:
        when "BankPayFormatID":U
        then assign oiBankPayformatID = int(tFilter.tcParameterValue) no-error.

        when "PrintType":U
        then assign ocPrintType = tFilter.tcParameterValue no-error.

        when "CCollectionNumber":U
        then assign oiCCollectionNumber = int(tFilter.tcParameterValue) no-error.

        when "CDocumentCreationDate_RANGE":U
        then do:
            if tFilter.tcOperator = ">=":U
            then assign otCDocumentCreationDateFrom = date(int(substr(tFilter.tcParameterValue, 5, 2, "CHARACTER":U)), int(substr(tFilter.tcParameterValue, 7, 2, "CHARACTER":U)), int(substr(tFilter.tcParameterValue, 1, 4, "CHARACTER":U))) no-error.
            else
            if tFilter.tcOperator = "<=":U
            then assign otCDocumentCreationDateTill = date(int(substr(tFilter.tcParameterValue, 5, 2, "CHARACTER":U)), int(substr(tFilter.tcParameterValue, 7, 2, "CHARACTER":U)), int(substr(tFilter.tcParameterValue, 1, 4, "CHARACTER":U))) no-error.
        end.

        when "CDocumentDueDate_RANGE":U
        then do:
            if tFilter.tcOperator = ">=":U
            then assign otCDocumentDueDateFrom = date(int(substr(tFilter.tcParameterValue, 5, 2, "CHARACTER":U)), int(substr(tFilter.tcParameterValue, 7, 2, "CHARACTER":U)), int(substr(tFilter.tcParameterValue, 1, 4, "CHARACTER":U))) no-error.
            else
            if tFilter.tcOperator = "<=":U
            then assign otCDocumentDueDateTill = date(int(substr(tFilter.tcParameterValue, 5, 2, "CHARACTER":U)), int(substr(tFilter.tcParameterValue, 7, 2, "CHARACTER":U)), int(substr(tFilter.tcParameterValue, 1, 4, "CHARACTER":U))) no-error.
        end.

        when "CDocumentIsOpen":U
        then assign olCDocumentIsOpen = tFilter.tcParameterValue = string(true) or tFilter.tcParameterValue = "true":U.

        when "CDocumentNumber_RANGE":U
        then do:
            if tFilter.tcOperator = ">=":U
            then assign oiCDocumentNumberFrom = int(tFilter.tcParameterValue) no-error.
            else
            if tFilter.tcOperator = "<=":U
            then assign oiCDocumentNumberTo = int(tFilter.tcParameterValue) no-error.
        end.

        when "CDocumentPrePrintedNumber_RANGE":U
        then do:
            if tFilter.tcOperator = ">=":U
            then assign oiCDocumentPrePrintedNumberFrom = int(tFilter.tcParameterValue) no-error.
            else
            if tFilter.tcOperator = "<=":U
            then assign oiCDocumentPrePrintedNumberTo = int(tFilter.tcParameterValue) no-error.
        end.

        when "CDocumentReference":U
        then assign ocCDocumentReference = tFilter.tcParameterValue.

        when "CDocumentStatus":U
        then assign ocCDocumentStatus = tFilter.tcParameterValue.

        when "CDocumentSubType":U
        then assign ocCDocumentSubType = tFilter.tcParameterValue.

        when "CDocumentTimesPrinted":U
        then assign olCDocumentTimesPrinted = tFilter.tcParameterValue = string(true) or tFilter.tcParameterValue = "true":U.

        when "CDocumentYear":U
        then assign oiCDocumentYear = int(tFilter.tcParameterValue) no-error.

        when "CreditorCode":U
        then assign ocCreditorCode = tFilter.tcParameterValue.

        when "CurrencyCode":U
        then assign ocCurrencyCode = tFilter.tcParameterValue.

        when "PaySelCode":U
        then assign ocPaySelCode = tFilter.tcParameterValue.

        when "IncreaseCDocumentTimesPrinted":U
        then assign olIncreaseCDocumentTimesPrinted = tFilter.tcParameterValue = string(true) or tFilter.tcParameterValue = "true":U.

        when "AssignCDocumentPrePrintedNumber":U
        then assign olAssignCDocumentPrePrintedNum = tFilter.tcParameterValue = string(true) or tFilter.tcParameterValue = "true":U.

        when "StartFromCDocumentPrePrintedNumber":U
        then assign oiStartCDocumentPrePrintedNum = int(tFilter.tcParameterValue) no-error.

        when "SkipCDocumentPrePrintedNumber":U
        then assign oiSkipCDocumentPrePrintedNum = int(tFilter.tcParameterValue) no-error.

        when "CreditorBRName_RANGE":U
        then do:
            if tFilter.tcOperator = ">=":U
            then assign ocCreditorFromBRName = tFilter.tcParameterValue no-error.
            else
            if tFilter.tcOperator = "<=":U
            then assign ocCreditorToBRName = tFilter.tcParameterValue no-error.
        end.
    end.
end.