开发者

How to display a Table for IEnumerable property on a Microsoft Report

开发者 https://www.devze.com 2023-01-09 06:32 出处:网络
I\'ve got a class with the following properties which I\'d like to display on a Microsoft Report: Class: Sales

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消