1

I used following code but I didn't get output.

SqlDataAdapter da = new SqlDataAdapter("select ddate,details from activitys where customerid=(Select customerid from crmtbe where companyname='" + comboBox1.Text + "')", con);
            DataSet dt = new DataSet();
            da.Fill(dt, "activitys");
            CrystalReport3 report = new CrystalReport3();
            report.SetDataSource(dt.Tables["activitys"]);
            crystalReportViewer1.ReportSource = report;
            crystalReportViewer1.Refresh();
4

1 回答 1

0

add Databind() to reportViewer. And it is better to use ID to retrieving data from database instead of names.

于 2013-02-06T09:26:54.447 回答