project QadFinancials > class BReportingJournalReport > method SetDataItemsBasedOnFilterTT

Description

Set the filter perameters and assign them to the correct data-item


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BReportingJournalReport.ReportingJournalExceptReport


program code (program2/breportingjournalreport.p)

empty temp-table tqReportingJournalExceptReport.
/* =================================================================== */
/* Find all filter-parameters and assign them to the correct data-item */
/* =================================================================== */

assign 
    viFromPostingYearFilter             = ?
    viToPostingYearFilter               = ?
    viFromPostingPeriodFilter           = ?
    viToPostingPeriodFilter             = ?
    vtFromPostingDateFilter1            = ?
    vtToPostingDateFilter1              = ?    
    vcCompanyListFilter                 = ?    
    vcDaybookCodeListFilter             = ?
    vcReportingDaybookListFilter        = ?
    vcTaxRegisterFilter                 = ?.

for each tFilter:
    case tFilter.tcBusinessFieldName:

       when "AccYear_RANGE":U
        then if tFilter.tcOperator = ">=":U then assign viFromPostingYearFilter = int(tFilter.tcParameterValue) no-error.
             else if tFilter.tcOperator = "<=":U then assign viToPostingYearFilter = int(tFilter.tcParameterValue) no-error.
        
        when "AccPeriod_RANGE":U
        then if tFilter.tcOperator = ">=":U then assign viFromPostingPeriodFilter = int(tFilter.tcParameterValue) no-error.
             else if tFilter.tcOperator = "<=":U then assign viToPostingPeriodFilter = int(tFilter.tcParameterValue) no-error.
        
        when "PostingDate_RANGE":U
        then if tFilter.tcOperator = ">=":U then assign vtFromPostingDateFilter1 = DATE(INTEGER(SUBSTRING(tFilter.tcParameterValue,5,2,"CHARACTER":U)),integer(SUBSTRING(tFilter.tcParameterValue,7,2,"CHARACTER":U)),INTEGER(SUBSTRING(tFilter.tcParameterValue,1,4,"CHARACTER":U))) no-error.
             else if tFilter.tcOperator = "<=":U then assign vtToPostingDateFilter1 = DATE(INTEGER(SUBSTRING(tFilter.tcParameterValue,5,2,"CHARACTER":U)),integer(SUBSTRING(tFilter.tcParameterValue,7,2,"CHARACTER":U)),INTEGER(SUBSTRING(tFilter.tcParameterValue,1,4,"CHARACTER":U))) no-error.
          
        when "Journal_CANDO":U
        then assign vcDaybookCodeListFilter = trim(trim(tFilter.tcParameterValue),',':U) no-error.
        
        when "ReportingJournal_CANDO":U
        then assign vcReportingDaybookListFilter = trim(trim(tFilter.tcParameterValue),',':U) no-error.

        when "Company_CANDO":U
        then assign vcCompanyListFilter = tFilter.tcParameterValue no-error.

        when "TaxRegister":U
        then assign vcTaxRegisterFilter = tFilter.tcParameterValue no-error.
     end.   
 end.