Crystal Reports V9
SQL database
I have developed a main report which forecasts leave balances by employee at a future date, and then linked a sub-report which details any future leave events recorded for that particular employee.
What I'm trying to do is to deduct the total leave hours booked (which are on the sub-report) from the leave balance (which is on the main report).
I'm trying to construct a shared variable to pass the booked leave hours in the sub-report to the main report and have tried to follow advice previously given to others in this forum. However, I'm really struggling.
By placing the following formula in the Group Footer on the sub-report, I'm able to get the correct value of the future leave to show on the sub-report
whileprintingrecords;
shared numbervar FutureLeave := sum({EMLVE.LVE_HOUR_TKNN});
In my main report, I have placed the following formula in the group header :
whileprintingrecords;
shared numbervar FutureLeave :=0;
In the main report in the group footer, I've placed the following formula:
whileprintingrecords;
shared numbervar FutureLeave;
The main report is bringing back a value, but it's dropping the value against the employee on the next line (i.e if Employee A has 24 hours of future leave, the 24 hours is showing against Employee B)
Can someone please point me in the right direction?
Thanks
SQL database
I have developed a main report which forecasts leave balances by employee at a future date, and then linked a sub-report which details any future leave events recorded for that particular employee.
What I'm trying to do is to deduct the total leave hours booked (which are on the sub-report) from the leave balance (which is on the main report).
I'm trying to construct a shared variable to pass the booked leave hours in the sub-report to the main report and have tried to follow advice previously given to others in this forum. However, I'm really struggling.
By placing the following formula in the Group Footer on the sub-report, I'm able to get the correct value of the future leave to show on the sub-report
whileprintingrecords;
shared numbervar FutureLeave := sum({EMLVE.LVE_HOUR_TKNN});
In my main report, I have placed the following formula in the group header :
whileprintingrecords;
shared numbervar FutureLeave :=0;
In the main report in the group footer, I've placed the following formula:
whileprintingrecords;
shared numbervar FutureLeave;
The main report is bringing back a value, but it's dropping the value against the employee on the next line (i.e if Employee A has 24 hours of future leave, the 24 hours is showing against Employee B)
Can someone please point me in the right direction?
Thanks