From: JB on 7 Apr 2010 21:08 Hello Andy It works! Crystal Reports is reading the whole file. I had to make the xml file the datasource. Thanks Jeff -- JB "Andy O'Neill" wrote: > > >"JB" <JB(a)discussions.microsoft.com> wrote in message > >news:54AA3399-A2AB-4D0A-B442-9C7E1413E314(a)microsoft.com... > > This code substitutes a datatable for the crystal report's datasource. > If you must have a dataset then DataTable dt = myDataset.Tables[0]; > > ReportDocument rd; > // Tricky bit here is to make the name of the datatable match what > the report expects > dt.TableName = "DataTable1"; > rd = new ReportDocument(); > rd.Load(Server.MapPath("Reports\\myReport.rpt")); > rd.SetDataSource(dt); > > rd.Refresh(); > CrystalReportViewer1.ReportSource = rd; > CrystalReportViewer1.RefreshReport(); > > . >
|
Pages: 1 Prev: Silverlight 4 combobox Next: Read data from excel file under Window 2008 web server |