A report is based on a collection so it is important to include at least
one collection in a view. Examples of specifying collections follow.
Collection of Agents
Agent.instances is a virtual collection of Agents.
Virtual collections must be constructed when the report is run.
Company.firstInstance.allAgents is a way to specify
a database collection that is accessed from the Company 'root' object.
Database collections already exists and are preferable to virtual collections.
Collection of Sales
Sale.instances would be an empty collection because Sale is abstract.
Company.firstInstance.allSalesByItem is a collection of sale objects
but features in RetailSale and TenderSale would be unavailable.
Collection of Retail Sales
RetailSale.instances is a collection of retail sales.
This is the collection we use for our view. |