Joins
Now in this case, the system will also create some joins by default but not all of them so let’s create all the joins required. We need to do the following inner joins:
- Inventory with item (the reason being inventory will always have an item)
- Item with company (item always belongs to a company)
- Inventory with facility (Inventory is always in a given facility)
- Inventory with inventory_status (inventory always has a status)
- Container with container_status (container always has a status)
The following left outer joins:
- Inventory with inventory_location ( as inventory may or may not be in an active location)
- Inventory with container (as inventory may or may not be in a container)
- Container with location (container may or may not be located)
- Inventory_location with inventory_location_type ( all inventory locations may not be active so its location type also may not be required if it is not in active)
- Location with location_type (this is for container’s location. All container’s may not be located and hence may not have a location type)
Now if you execute this report, the following is the output which is the very same as the one we created with Web Reports Gen1 and it is much faster in execution as well.