Home Subreports
New Blog Posts: Merging Reports - Part 1 and Part 2

Assign a value to a label on a main form based on the sum of a variable on a subform

edited January 2005 in Subreports
We have a report containing 1 subreport.

The subreport is assigned the rooms dataset.
i.e each time the room value changes, we have a new instance of the
sub-report.

The subreport itself gives a list of all the inventories within each room.
If there are a number of rooms in a property the page will display an
instance of the subreport for each room.

In the summary of the sub-report we have a sum of the value of each
inventory.

What I want to do, is take the value of this sum in each subreport and add
them to give a total value for the property.
This is to appear on the main form.

Example.

Property Name

Room
inventories value
inventories value
inventories value
sum of (inventories value)
Room
inventories value
inventories value
inventories value
sum of (inventories value)
Room

inventories value
inventories value
inventories value
sum of (inventories value)


sum of (sum of (inventories
value))



The main problem I have is referencing objects that are outside the local
scope of a report.

Any help or direction would be greatly appreciated.

Thanks
Dermot

Comments

This discussion has been closed.