如何用Crystal Report绑定动态数据集? [英] how to bind dynamic dataset with Crystal Report ?

查看:55
本文介绍了如何用Crystal Report绑定动态数据集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我在按钮单击事件上创建名为"dt1"的数据集.现在,我想将此数据集的值绑定到Crystal Report,但我不知道该怎么做.任何人都可以帮助我吗?
我正在使用的代码如下:

Hello

I am creating dataset named "dt1" on button click event. Now I want to bind this dataset''s values to crystal report but i dont know how to do that. So anyone can pls help me ?
The Code that i am using is as below:

Dim ds as new dataset
ds.tables.add("dt1")
ds.tables("dt1").columns.add("c1") 
ds.tables("dt1").columns.add("c2")

ds.tables("dt1").rows.item("c1") = textbox1.text
ds.tables("dt1").rows.item("c2") = textbox2.text
ds.tables("dt1").AcceptChanges()

dim oRpt as Testrpt
oRpt.setDatasource=(ds.tables("dt1"))
Test.CrystalReportViewer1.Reportsource=oRpt
Test.show()



但它给出错误报告具有0个表"
请帮助我?????????:confused:


温馨的问候,
Dhaval Gandhi:)



but it gives error "THE REPORT HAS 0 TABLES"
pls help me ?????????:confused:


Warm Regards,
Dhaval Gandhi :)

推荐答案

您需要创建一个架构来设计报告.
此处查看 [
You need to create a schema to design the report.
Take a look at here[^]


这篇关于如何用Crystal Report绑定动态数据集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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