C# winform 设计不规则表格报表
我刚开始接触报表,有个任务要求把查询出来的结果以具体的表格打印出来,或者以特定的表格形式导入Excal打印,哪位高手教教我,或者给个实例看看,留下QQ也行
------解决方案--------------------你的问题是:不会导出报表还是不会设计报表的界面?
------解决方案--------------------该回复于2012-04-10 17:12:46被版主删除
------解决方案--------------------用 MultiRow for Windows Forms
------解决方案-------------------- ReportDocument Reportdoc = new ReportDocument();
private void SelectBasic1_Load(object sender, EventArgs e)
{
string conn = @"Provider=Microsoft.jet.OLEDB.4.0;Data Source=" + Application.StartupPath.ToString() + "\\demo.mdb";
string sqlstr = "select * from [user]";
//where userID='" + session["userid"] + "'";
OleDbConnection sqlcon = new OleDbConnection(conn );
sqlcon.Open();
// OleDbCommand sqlcom = new OleDbCommand(sqlstr, sqlcon);
OleDbDataAdapter sqlad = new OleDbDataAdapter(sqlstr, sqlcon);
DataSet ds = new DataSet();
// sqlad.SelectCommand = sqlcom;
sqlad.Fill(ds, "sqlstr");
crystalReportViewer1.ReportSource = Reportdoc;
//ReportDocumentr = newReportDocument();
//r.Load("CrystalReport1.rpt");
//r.SetDataSource(StudentBusiness.GetAllStudents());
//this.crystalReportViewer1.ReportSource = r;
}
我这绑定哪里出错啦,运行后能打开页面但提示路径无效、、、急!!!
------解决方案--------------------你那个数据库文件mdb的路径有没有写错,写成绝对路径试试~