stnkyminky
Programmer
VB
Dim dt1 as new DataTable
dt1 = ds.Tables(0)
C#
DataTable dt1 = new DataTable();
dt1 = ds.Tables(0); <--'System.Data.DataSet.Tables' denotes a 'property' where a 'method' was expected
I thought the code should be the same for either language.
Also here is what sparked the whole question. I have a crystal report that contains 1 subreport. I am pushing data to the report.
Here is my attempt in C#. I know for a fact that this will work in VB.net. BTW I get the same error as above with this code as well.
report.SetDataSource(ds.Tables(0));
report.OpenSubreport("kanban3".SetDataSource(ds.Tables(1));
Scott
Programmer Analyst
<{{><
Dim dt1 as new DataTable
dt1 = ds.Tables(0)
C#
DataTable dt1 = new DataTable();
dt1 = ds.Tables(0); <--'System.Data.DataSet.Tables' denotes a 'property' where a 'method' was expected
I thought the code should be the same for either language.
Also here is what sparked the whole question. I have a crystal report that contains 1 subreport. I am pushing data to the report.
Here is my attempt in C#. I know for a fact that this will work in VB.net. BTW I get the same error as above with this code as well.
report.SetDataSource(ds.Tables(0));
report.OpenSubreport("kanban3".SetDataSource(ds.Tables(1));
Scott
Programmer Analyst
<{{><