Hi there,
I am trying to get a value back from a sub report to the main report, but everytime i set the scope of the required variable to Shared the value of the variable resets to 0.
The formula is as follows...
if i run the report with this formula the OPTinSec value is correct. As soon as I change the second line to
it always gives a value of 0. Any ideas why it would be doing this?
I am trying to get a value back from a sub report to the main report, but everytime i set the scope of the required variable to Shared the value of the variable resets to 0.
The formula is as follows...
Code:
BooleanVar doit;
NumberVar OPTinSec;
If ({ERA_MSCH_ACTIVITIES.ERA_ACTIVITY_TYPE} = 2) Then
(
OPTinSec := OPTinSec - DateTimeToSeconds ({ERA_MSCH_ACTIVITIES.ERA_START_TIME});
doit := true;
)
Else
If (doit = true) Then
(
OPTinSec := OPTinSec + DateTimeToSeconds ({ERA_MSCH_ACTIVITIES.ERA_START_TIME});
doit := false;
)
Else
(
doit := false;
);
OPTinSec
if i run the report with this formula the OPTinSec value is correct. As soon as I change the second line to
Code:
Shared NumberVar OPTinSec;
it always gives a value of 0. Any ideas why it would be doing this?