Click here to Skip to main content
15,502,045 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
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:

VB
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()


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


Warm Regards,
Dhaval Gandhi :)
Posted
Updated 25-Aug-10 20:54pm
v2

1 solution

You need to create a schema to design the report.
Take a look at here[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900