CSADataCruncher
Technical User
I'm feeling a little dense right now because I just can't seem to figure out how to use variable fields properly and I'm fairly certain that variables are exactly what I need to accomplish my goal.
So, here is my goal. I'm creating a report that tracks an employee's weekly time and expenses. One of the reimbursements that we track is mileage. However, we need to subtract 30 commuting miles per day if the employee travelled more than 30. I'm putting the mileage into a subreport for this timesheet.
So, on my mileage subreport, I pretty much have that portion working correctly... I created a formula field that finds the reimbursed mileage as such:
If {TimeSheetExpenses.Reimbursable}= true and
{TimeSheetExpenses.ItemNumber}='Mileage' and Sum ({TimeSheetExpenses.Quantity}, {TimeSheetExpenses.ExpenseDate}, "daily")>=30
then Sum ({TimeSheetExpenses.Quantity}, {TimeSheetExpenses.ExpenseDate}, "daily")-30
else Sum ({TimeSheetExpenses.Quantity}, {TimeSheetExpenses.ExpenseDate}, "daily")-Sum ({TimeSheetExpenses.Quantity}, {TimeSheetExpenses.ExpenseDate}, "daily")
.... and I have this coding in the expense date group footer section of my subreport.
Now what I need to have help with is getting this group total for each day added into a weekly total group footer for the timesheet number.
As you may know, I cannot summarize this field. So, I've been reading up on NumberVar and Shared NumberVar but keep coming up with zeros so I'm hoping that someone may be able to give me some exact coding and tell me where on the report I should add the coding.
Thank you, in advance, for your help.
Peggy
So, here is my goal. I'm creating a report that tracks an employee's weekly time and expenses. One of the reimbursements that we track is mileage. However, we need to subtract 30 commuting miles per day if the employee travelled more than 30. I'm putting the mileage into a subreport for this timesheet.
So, on my mileage subreport, I pretty much have that portion working correctly... I created a formula field that finds the reimbursed mileage as such:
If {TimeSheetExpenses.Reimbursable}= true and
{TimeSheetExpenses.ItemNumber}='Mileage' and Sum ({TimeSheetExpenses.Quantity}, {TimeSheetExpenses.ExpenseDate}, "daily")>=30
then Sum ({TimeSheetExpenses.Quantity}, {TimeSheetExpenses.ExpenseDate}, "daily")-30
else Sum ({TimeSheetExpenses.Quantity}, {TimeSheetExpenses.ExpenseDate}, "daily")-Sum ({TimeSheetExpenses.Quantity}, {TimeSheetExpenses.ExpenseDate}, "daily")
.... and I have this coding in the expense date group footer section of my subreport.
Now what I need to have help with is getting this group total for each day added into a weekly total group footer for the timesheet number.
As you may know, I cannot summarize this field. So, I've been reading up on NumberVar and Shared NumberVar but keep coming up with zeros so I'm hoping that someone may be able to give me some exact coding and tell me where on the report I should add the coding.
Thank you, in advance, for your help.
Peggy