project BLF > class BReportComm > method InitInstance

Description

This method can be extended with code to execute when an instance of a business class is started.

PreCondition

This method is executed when a new instance of the business class is started, or when a draft instance is opened (in that case a new instance is started which is a copy of the draft instance).


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program1/breportcomm.p)

/* do not read all session values, and do not fail if no session is available */
if viSessionID <> 0
then do:
    <M-1 run StartCacher
       (output vhFcComponent (ohCacher), 
        output viFcReturnSuper (oiReturnStatus)) in BReportComm>
    if viFcReturnSuper <> 0
    then oiReturnStatus = viFcReturnSuper.
    if viFcReturnSuper < 0
    then return.
    <M-2 run GetCharacterValueFromSession
       (input  viSessionID (iiSessionId), 
        input  'GlobalSessionId' (icDataItemName), 
        output vcGlobalSessionId (ocValue), 
        output viFcReturnSuper (oiReturnStatus)) in Cacher>
    <M-62 run GetIntegerValueFromSession
       (input  viSessionID (iiSessionId), 
        input  'TimeOffset' (icDataItemName), 
        output viTimeOffset (oiValue), 
        output viFcReturnSuper (oiReturnStatus)) in Cacher>
    session:timezone = viTimeOffset.
end.