I've got a class with the following properties which I'd like to display on a Microsoft Report:
Class: SalesProperty Type DateOfSale DateTime TellerName String Purchase List(Of Purchases)The definition of the Purchases class is as follows: Class: Purchases
Property Type Item String Quantity Integer UnitCost Decimal TotalCost DecimalMy objective is to create a report showing each transaction (
Sales
) that was made within a particular time span [say, within one week].
I've so far been able to display the DateOfSale
and TellerName
on the report using TextBoxes.
Purchase
for each sale as a Table and that is where I'm stumped开发者_如何学编程.
Does anyone know how I can display the Purchase
property as a table on the report and sum the TotalCost
of all the purchases made in a given Sales
at the bottom of the table?
I found a way around it. Just create a class which holds all the necessary properties and create as many instances as necessary. Passing them as arguments to the DataSource of the report displays them all there.
精彩评论