摘要: 首先创建 一个新的Parameter, 比如名字 News,Type: String, List of Values: Static.保存后, 把新的 Parameter Field拖入report 适合的位置。选择这个field, Format Field, 进入 Paragraph tag, Text Interpretation 选Html Text。后台程序 report.SetParameter("News", "google");生成的report 就会含有超链接同样方法可以支持 Rtf Text。 阅读全文
posted @ 2013-06-25 11:04 gunsmoke 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 3. linq group by with a custom classDeclare Custom classpublic class PortableKey{ public Dictionary<string, object> keyBag { get; set; } public PortableKey(Dictionary<string, object> Keys) { this.keyBag = Keys; } public override bool Equals(object obj) { PortableKey o... 阅读全文
posted @ 2012-06-26 07:18 gunsmoke 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 1. 使用 DataView// create a dv from the source dtDataView dv = new DataView(dt);// set the output columns array of the destination dtstring[] strColumns = {"NodeID", "Title", "Url"};// true = yes, i need distinct values.dt = dv.ToTable(true, strColumns); 2. 使用linq groupby 阅读全文
posted @ 2012-06-06 12:05 gunsmoke 阅读(233) 评论(0) 推荐(0) 编辑
摘要: DynamicObject & ExpandoObject should be accessed in different way. public static DataTable ToDataTable<T>( IEnumerable<T> input, string tableName) { var dt = new DataTable(); dt.TableName = tableName; if (input == null || !input.Any()) return dt; ... 阅读全文
posted @ 2012-05-15 13:33 gunsmoke 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 最近装windows 7时突然遇到一个奇怪的问题。我之前一直用移动硬盘,设成活动分区,然后把 windows 7的ISO解包到移动硬盘的根目录,用它来启动安装 从来没问题。可是装一台没光驱的新电脑时却出现“A required CD/DVD drive device driver is missing. If you have a driver floppy disk, CD, DVD, or USB flash drive, please insert it now.”怎么也跳不过去。在网上找了不少方法,比如用U盘加载主板的SATA驱动啊, 设置不同的启动顺序啊, 把bios中的SATA 从 阅读全文
posted @ 2012-01-10 17:52 gunsmoke 阅读(2323) 评论(0) 推荐(0) 编辑
摘要: 正在做的项目里面有需要把DAL 产生的Poco Collection转为DataTable然后交给别的模块处理报表想了一下 写个支持Generic的方法吧, 不过不知道如何判断 T是否是DynamicObject的类型于是取了第一个item,用它来判断一下,这样写肯定不是最好的,把code贴上抛砖引玉。public static DataTable ToDataTable<T>(IEnumerable<T> input, string tableName) { var dt = new DataTable(); dt.TableName... 阅读全文
posted @ 2011-10-20 12:14 gunsmoke 阅读(554) 评论(0) 推荐(0) 编辑