Crystal Reports, IList<T> as DataSource
For a long time now since VS2002/2003 I been开发者_如何学编程 simple class that only required .rpt file and DataSet as DataSource to produce Crystal Report (such as .pdf, .doc, .xls .. etc). Since then, I never revisit the class (which delivery what I expected) even with the released of VS2005 & VS2008 and now VS2010.
But yesterday, I am just wondering, if passing Generics/IList<T>
as datasource is now possible.
Thanks.
It really depends if Crystal allows you to pass in a generics. However generics is really not really but more a compile-time blackmagic. So for Crystal to work it will need a thing.
The dataset carries over both structure for the Crystal designer to fields etc and data for the actual report. Basically the Dataset gives the same structure info returned from a DB.
IList would be able to give Crystal the structure info needed to create the Field List etc.
精彩评论