Description
Add code here to initialize the calculated fields of the class temp-tables after loading existing records from the application database.
Parameters
oiReturnStatus | output | integer | |
Internal usage
unused
program code (program/bfrwtreeview.p)
<ANCESTOR-CODE>
/* since calcualte will be called in the dataload, generally dataload will only load one record at one time.
at the begging and at the end there is no start query and end query method.
*/
for each tFRWTreeView where
tFRWTreeView.tc_Status <> "D":U :
/* Read all Cube */
if tFRWTreeView.FRWCube_ID >0
then do :
<Q-90 run FRWCubePrim (all) (Read) (NoCache)
(input tFRWTreeView.FRWCube_ID, (FRWCubeId)
input ?, (FRWCubeCode)
output dataset tqFRWCubePrim) in BFRWCube>
/* Set the cube-code */
find tqFRWCubePrim where
tqFRWCubePrim.tiFRWCube_ID = tFRWTreeView.FRWCube_ID
no-lock no-error.
if available tqFRWCubePrim
then assign tFRWTreeView.tcFRWCubeCode = tqFRWCubePrim.tcFRWCubeCode.
end. /* if not can-find (first ) */
/* Read all AnCode */
if tFRWTreeView.FRWAnCode_ID <> ? and tFRWTreeView.FRWAnCode_ID <> 0
then do :
<Q-25 run FRWAnCodePrim (all) (Read) (NoCache)
(input tFRWTreeView.FRWAnCode_ID, (FRWAnCode_ID)
input ?, (FRWAnCodeCode)
output dataset tqFRWAnCodePrim) in BFRWAnalysisCode>
/* Set the AnCode-code */
find tqFRWAnCodePrim where
tqFRWAnCodePrim.tiFRWAnCode_ID = tFRWTreeView.FRWAnCode_ID
no-lock no-error.
if available tqFRWAnCodePrim
then assign tFRWTreeView.tcFRWAnCodeCode = tqFRWAnCodePrim.tcFRWAnCodeCode.
end. /* if not can-find (first ) */
/* Read all Tree node */
if tFRWTreeView.FRWTreeNode_ID > 0
then do :
<Q-22 run ReportTreePrim (all) (Read) (NoCache)
(input tFRWTreeView.FRWTreeNode_ID, (FRWTreeNode_ID)
input ?, (FRWTreeNodeCode)
output dataset tqReportTreePrim) in BReportTree>
/* Set the tree node-code */
find tqReportTreePrim where
tqReportTreePrim.tiFRWTreeNode_ID = tFRWTreeView.FRWTreeNode_ID
no-lock no-error.
if available tqReportTreePrim
then assign tFRWTreeView.tcFRWTreeNodeCode = tqReportTreePrim.tcFRWTreeNodeCode.
end. /* if not can-find (first ) */
end. /* for each tFRWTreeView where */