在VB.NET 2005 App中使用Crystal Report报告DataSet [英] Reporting DataSet Using Crystal Report in VB.NET 2005 App

查看:118
本文介绍了在VB.NET 2005 App中使用Crystal Report报告DataSet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Crystal Reports报告未键入的DataSet / DataTable?我无法在设计时定义架构,因为我的DataSet / DataTable是动态构建的,并且列数随每次运行而变化。

谢谢

推荐答案

一种方法是将数据集保存到XML:

One way is to save your dataset to XML:

ds.WriteXml(" c:\\sc.xml",XmlWriteMode.WriteSchema)

ds.WriteXml("c:\\sc.xml", XmlWriteMode.WriteSchema)

在运行时将位置设置为XMl,Crystal报表应该只是自动删除XML文件中没有的任何字段。尽管如此,还是有一种方法。

Set location to the XMl at runtime and Crystal reports should just auto delete any fields that are not in the XML file. Kind of iffy way to do though.

其他选择是升级到完整版的Crystal Reports并使用RAS每次动态构建报告或使用模板报告添加/删除字段和其他报表对象。

Other option is to upgrade to a full version of Crystal Reports and use RAS to build your reports on the fly each time or use a template report to add/remove fields and other report objects.

Don


这篇关于在VB.NET 2005 App中使用Crystal Report报告DataSet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆