Sir i am not able to create an object of my crystal report page in .aspx page(the one which is having crystal report viewer in it).
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
public partial class cr : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
DataSet1 ds=new DataSet1();
SqlDataAdapter adapter=new SqlDataAdapter("SELECT UserName, WardNo, Password, ElectionId, Day, Month, Year, Gender, EmailId, Address FROM dbo.users",con);
adapter.Fill(ds.viewcan);
CrystalReport report=new CrystalReport();
report.SetDataSource(ds);
CrystalReportViewer1.ReportSource=report;
}
}
Compilation Error
Compiler Error Message: CS0246: The type or namespace name 'CrystalReport' could not be found (are you missing a using directive or an assembly reference?)
|
Line 16: SqlDataAdapter adapter=new SqlDataAdapter("SELECT UserName, WardNo, Password, ElectionId, Day, Month, Year, Gender, EmailId, Address FROM dbo.users",con);
Line 17: adapter.Fill(ds.viewcan);
Line 18: CrystalReport report=new CrystalReport(); Line 19:
Line 20: report.SetDataSource(ds);
|