Question

I have a report and trying to use ReportViewer control to built it, but having some problems.

The report will have the following data:

"Part State Fund MDP ACO Quantity Unit Cost Total Cost"

I want to create a report, that on each page, it prints a table of all data grouped by state.

I have it working that it prints correctly with the group. However: after the each state, I need a table that prints the totals of that state based on ACO - MDP - FUND - TOTAL COST. Then once that table is done, just a text box with the total cost for the state. So there are three sections for each state that need to be displayed before moving onto the next state.

1). Display all records in the recordset for that state (this part is working, I did a Parent Grouping).

2). Once Step #1 has been completed, output another table that lists the records for the given state grouped: ACM, MDP, FUND. But the table will display the unique rows of ACM, MDP and Fund in a column with a fourth column of TOTAL Cost for the total cost of all items that fall into each group.

3). A textbox with the total cost of items for the state

Once all three sections have been displayed to the end user, a page break is added so the report can break. This works for just step #1, but not sure how to incorporate step #2 and step #3.

Greatly appreciate any help.

Was it helpful?

Solution

I would move all the State-level objects out into a Sub Report - a new .rdl file. Then in the "master" report I would create a Dataset with a row for each State. I would use that Dataset to drive a table with a single column and just a Detail row. In that cell I would add a Sub Report object and point it at the Sub Report, passing State as a parameter.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top