Crystal Reports VS Beta 2 Problem Web form
Where have I lost it? I’m just trying to do a real simple report. Dropped a CR Report viewer on a panel on the form.
mytable = New DataTable("MyTable")
With Mytable
.Columns.Add("Field1", GetType(String))
.Columns.Add("Field2", GetType(String))
.Columns.Add("Field3", GetType(Int32))
.Columns.Add("Field4", GetType(Int32))
.Columns.Add("Field5", GetType(Int32))
.Columns.Add("Field6", GetType(Int32))
.Columns.Add("Field7", GetType(Int32))
.Columns.Add("Field8", GetType(String))
.Columns.Add("Field9", GetType(String))
End With
MyTable.PrimaryKey = New DataColumn() {MyTable.Columns("Field1")}
Put some stuff into the table
Dim oRpt as New CrystalDecisions.CrystalReports.Engine.ReportDocument()
oRpt.Load("My.rpt")
oRpt.SetDataSource(MyTable)
CrystalReportViewer1.DataSource = oRpt *Error here
CrystalReportViewer1.DataBind()
Error returned:
HierarchicalDataBoundControl only accepts data sources that implement IHierarchicalDataSource or IHierarchicalEnumerable
Can you not use a datatable that you build in code at run time?
Or have I totally missed how to do this?
TIA
It's Time to get a gun.
That's what I've been thinkin.
I think I can afford one, If I do a little less Drinkin.www.TrueGeeks.com