简体   繁体   中英

Automatic table and data binding

I must create a report in Winforms DevExpress xtraReport. Report will contain dynamically created table. I want to get something like this:

在此处输入图片说明

So I have list of object with data person = John, article = juice, quantity = 2; person = John, article = meat, quantity = 3.

In addition I want to empty article doesn't appear (in my example shouldn't be column meat).

How can I achieve this in easiest way? Is there any other way than manually create each row? I've tried using Pivot but it seems hard to achieve without much work.

如果您在运行时不知道这些字段,则可以使用DataTable作为数据源。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM