Lister
Z Shift
- Local time
- Tomorrow, 07:30
- Joined
- Aug 24, 2003
- Messages
- 305
I have a report with two sub reports, the main report show the “Mother Batch” and details. And the Sub reports, show totals that were ship to customers.
The first Sub report shows jobs that were dyed and then shipped.
Where as the second report shows jobs that were sent with out being dyed (we’ll call them “raw” batches).
So from a Mother Batch, you can have all dyed or all Raw or a combination of both.
So far, so good. At the bottom of each sub report it Sum’s the total amount shipped.
Then it use this code to sum up both raw and dyed job’s in an unbound field.
And again this works fine. As long as its a combination of dyed and raw.
But if a job is totally Raw or totally Dyed, in other words there is only data returned in one sub report and the other is empty, the “Grand Total” returns an error. #Error
What can I do with the code/field to return a total in the Grand Total even if there is data in only one of the sub reports?
Perhaps an Iif Statement to check for null values?
I’m not that good with Iif yet, but still trying.
Any help would be great.
Thanks
The first Sub report shows jobs that were dyed and then shipped.
Where as the second report shows jobs that were sent with out being dyed (we’ll call them “raw” batches).
So from a Mother Batch, you can have all dyed or all Raw or a combination of both.
So far, so good. At the bottom of each sub report it Sum’s the total amount shipped.
Then it use this code to sum up both raw and dyed job’s in an unbound field.
Code:
=([rptColouredSubReport].[Report]![SumSubColour])+([rptNatSubReport].[Report]![SumNat])
And again this works fine. As long as its a combination of dyed and raw.
But if a job is totally Raw or totally Dyed, in other words there is only data returned in one sub report and the other is empty, the “Grand Total” returns an error. #Error
What can I do with the code/field to return a total in the Grand Total even if there is data in only one of the sub reports?
Perhaps an Iif Statement to check for null values?
I’m not that good with Iif yet, but still trying.
Any help would be great.
Thanks