I am trying to set the datasource for my crystal reports from a dataset. This is what I have so far:
protected void Page_Load(object sender, EventArgs e)
{
DataSet ds = new DataSet();
ds = util.getReportDataSet(DateTime.Now.AddYears(-5), DateTime.Now);
CrystalDecisions.Web.Report report = new CrystalDecisions.Web.Report();
//CrystalDecisions.Web.CrystalReportSource source = new CrystalDecisions.Web.CrystalReportSource();
// source.Report = report;
report.FileName = @"MyReport.rpt";
crs1.Report = report;
CrystalReportViewer1.ReportSource = crs1;
}
html:
<form id="form1" runat="server">
<div>
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" />
<CR:CrystalReportSource ID="crs1" runat="server" />
</div>
</form>
When the CrystalReportViewer1.ReportSource = crs1; execytes, I am getting this error:
Microsoft JScript runtime error: 'bobj' is undefined
Any idea what's wrong? I am using .net framework 3.5. Thanks in advance, Laziale
UPDATE:
Running the page in Chrome doesn't show that error, but also I am getting blank page although the dataset has data.
<CRin reference tocrs1are you missing some code or some instantiating somewhere..? - MethodMan