project BLF > class BReportRequest > method CreateReportSchedule

Description

Initialize a new record in class table tReportSchedule.


Parameters


ic_ParentRowidinputcharacter= tReportSchedule.tc_ParentRowid
BReportRequestoutputdatasetclass dataset, containing only the newly initialized record
oiReturnStatusoutputintegererror status


program code (program/breportrequest.p)

    assign oiReturnStatus = -98.

    empty temp-table t_sRptRequest.
    empty temp-table t_sRptRequestCBF.
    empty temp-table t_sRptRequestFilter.
    empty temp-table t_sRptRequestMail.
    empty temp-table t_sCustomTable0.
    empty temp-table t_sCustomTable1.
    empty temp-table t_sCustomTable2.
    empty temp-table t_sRptRequestContext.
    empty temp-table t_sReportSchedule.
    create tReportSchedule.
    assign tReportSchedule.tc_Rowid  = dynamic-function("GetNumberForNew":U in {&TARGETPROCEDURE})
           tReportSchedule.tc_Status = "N":U.
    assign tReportSchedule.tc_ParentRowid = ic_ParentRowid.
    { includes/bfcrun.i
      &procedure  = "InitialValues"
      &parameters = "input 'ReportSchedule':U,
                     output oiReturnStatus" }

    create t_sReportSchedule.
    raw-transfer tReportSchedule to t_sReportSchedule.