I haven't worked with the web viewer, but in WinForms I add a property to the form with the viewer. This property will contain the dataset I want to use for the report.
In the "Set" for the property, I set the report document's datasource to the dataset.
In C# the code to open the new for looks something like this:
ReportViewer viewer = new ReportViewer();
viewer.DataSrc = rptDS;
viewer.Show();
In the viewer form, the code looks like this:
private ReportDocument myReport;
public CrystalDocReportViewer(DataSet ds)
{
InitializeComponent();
rpt = new MyReport();
}
public DataSet DataSrc
{
set
{
rpt.SetDataSource(value);
viewer.ReportSource = rpt;
}
}
-Dell