views:

43

answers:

1

I've got a class with the following properties which I'd like to display on a Microsoft Report:



Class: Sales

Property    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   Decimal



My 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.
I'd like to display the 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?

A: 

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.

Alex Essilfie