Hi,
I have several business objects I'm needing to run reports against. I
haven't had any problems creating simple reports going against one or two
objects, but I have a summary report I need to generate and it's driving me
nuts. At the top level, I have an Estimate object which contains a
Departments collection of Department objects, each of which contains a
Drawings collection of Drawing objects. A simple tree of these objects is:
Estimate
|--- Departments
|--- Department
|--- Drawings
|--- Drawing
There are various types of drawings contained in the Drawings collection:
CADD-generated, existing manually-drawn, etc. So, the report needs to loop
through each department and loop through each drawing within that department
to gather the data for the report.
To create the data sources for the report, I'm trying to use the following:
Estimate est = new Estimate.GetEstimate(estimateNumber);
Departments estDept = est.Department;
Drawings estDwgs = estDept.Drawing;
I have three ProjectBindingSource objects using the above as follows:
estBindingSource.DataSource = est;
estDeptBindingSource.DataSource = estDept;
estDwgsBindingSource.DataSource = estDwgs;
Programmatically, I'm able to loop through the objects as desired (I have to
alter the last statement a bit...such as, Drawings estDwg =
estDept[i].Drawings), but I can't get the report to work correctly. It will
loop through the Departments collection and return the information from the
Department, but it only pulls the Drawing information for the first
Department and then displays it for all subsequent Department objects.
I realize this is rather limited info, but can anyone please point me in the
right direction as to how to format my summary report??? Many thanks!