“CrystalReport1”(是否缺少 using 指令或程序集引用?)在线等急!!
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using CrystalDecisions.Web;
public partial class highcharts : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
BindReport();
}
private void BindReport()
{
string strProvider = "server='.\\sqlexpress';database='hospital';uid='sa';pwd='sa' ";
CrystalReport oCR = new CrystalReport();
DataSet1 ds = new DataSet1();
SqlConnection MyConn = new SqlConnection(strProvider);
MyConn.Open();
string strSel = "select * from papers";
SqlDataAdapter MyAdapter = new SqlDataAdapter(strSel, MyConn);
MyAdapter.Fill(ds,"paper_id");
oCR.SetDataSource(ds);
this.CrystalReportViewer1.ReportSource = oCR;
}
}
ASP.NET
------解决方案--------------------需要引用水晶报表的dll,水晶报表需要单独安装