Parameters
icMethodName | input | character | |
ocRptNewUri | output | character | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/treportswitchmenu.p)
/* using the dynamic query to access the tables */
define variable vhrptres_mstr as handle no-undo.
define variable qhrptres_mstr as handle no-undo.
create query qhrptres_mstr in widget-pool "non-persistent".
create buffer vhrptres_mstr for table "rptres_mstr" in widget-pool "non-persistent".
qhrptres_mstr:set-buffers(vhrptres_mstr).
/* ===================================================== */
/* Look in rptdes_mstr with QAD_<ClassName>_<MethodName> */
/* ===================================================== */
assign vcRptMstrCode = "QAD_" + replace(icMethodName,".","_").
qhrptres_mstr:query-prepare("for each rptres_mstr where rptres_mstr.rptres_code = " + quoter(vcRptMstrCode) + " no-lock" ).
qhrptres_mstr:query-open.
qhrptres_mstr:get-first().
if not qhrptres_mstr:query-off-end
then do:
assign ocRptNewUri = "urn:qad-report:c1:" + vcRptMstrCode.
qhrptres_mstr:query-close.
end.
else do:
qhrptres_mstr:query-close.
/* ================================================ */
/* Look in rptdes_mstr QAD_<MethodName> */
/* ================================================ */
assign vcRptMstrCode = "QAD_" + entry (2,icMethodName,".").
qhrptres_mstr:query-prepare("for each rptres_mstr where rptres_mstr.rptres_code = " + quoter(vcRptMstrCode) + " no-lock" ).
qhrptres_mstr:query-open.
qhrptres_mstr:get-first().
if not qhrptres_mstr:query-off-end
then assign ocRptNewUri = "urn:qad-report:c1:" + vcRptMstrCode.
qhrptres_mstr:query-close.
end. /* else do: */
delete object qhrptres_mstr no-error.
assign qhrptres_mstr = ?.
delete object vhrptres_mstr no-error.