Hi,
I have a report listing all my equipment, it has three subreports where the equipment are listed. I want to calculate total number of items, total weight, number of boxes in each subreport. The totals is linked to 3 fields on the main report. The problem is that occasionally there is subreports with no record which i creating an error in one of the calculations field and that gives an error on the corresponding main report field.
I have solved it by using hidden fields on the main report and using IIf(IsNull(....),0,result), but this is not a good way of doing it.
The other way is using Dsum, Dcount, Dmax etc but it's not recomended because it's slows the operation (?).
I have tried open_form event, but that is put in action before any records are calculated. And the active event makes it run everytime the report get active.
What is the best way of solving this? I have tried searching the forum, but I can't really find a good solution.
--kenneth
I have a report listing all my equipment, it has three subreports where the equipment are listed. I want to calculate total number of items, total weight, number of boxes in each subreport. The totals is linked to 3 fields on the main report. The problem is that occasionally there is subreports with no record which i creating an error in one of the calculations field and that gives an error on the corresponding main report field.
I have solved it by using hidden fields on the main report and using IIf(IsNull(....),0,result), but this is not a good way of doing it.
The other way is using Dsum, Dcount, Dmax etc but it's not recomended because it's slows the operation (?).
I have tried open_form event, but that is put in action before any records are calculated. And the active event makes it run everytime the report get active.
What is the best way of solving this? I have tried searching the forum, but I can't really find a good solution.
--kenneth