水晶报表加载失败 帮我看看啊

lo8023ve 2012-07-19 08:49:54
protected void Page_Load(object sender, EventArgs e)
{
DataSet ds1=new DataSet();
SqlDataAdapter da = new SqlDataAdapter();
string ConnectionString = "Data Source=YS21;Initial Catalog=YDB1;User ID=sa;Password=system;";
SqlConnection con = new SqlConnection(ConnectionString);
SqlCommand cmd = new SqlCommand();//连接设置

da = new SqlDataAdapter("SELECT YY01 as YY01,MM01 as MM01,DD01 as DD01,NAMEKJ01 as NAMEKJ01,RODRDY01 as RODRDY01,SDLVDY01 as SDLVDY01,RODRDY01 as RODRDY01,PRICE01 as PRICE01,AMOUNT01 as AMOUNT01,EDUSER01 as EDUSER01,ECUSTSN01 as ECUSTSN01,DUSER01 as DUSER01,CUSTSN01 as CUSTSN01,ORDRNO01 as ORDRNO01,FPROCS01 as FPROCS01,USRCOD01 as USRCOD01,DRWNUM01 as DRWNUM01,TEST01 as TEST01,SETHIS01 as SETHIS01,OPRONO01 as OPRONO01,ITEMCD as ITEMCD,SHIPCO as SHIPCO,PRONAM01 as PRONAM01,TYPENO01 as TYPENO01,COMENT01 as COMENT01,ARNGNM01 as ARNGNM01,PARTS101 as PARTS101,PARTS201 as PARTS201,PARTS301 as PARTS301,PARTS401 as PARTS401,PARTS501 as PARTS501,PARTS601 as PARTS601,SHAPE101 as SHAPE101,SHAPE201 as SHAPE201,SHAPE301 as SHAPE301,SHAPE401 as SHAPE401,SHAPE501 as SHAPE501,SHAPE601 as SHAPE601,SPLYD101 as SPLYD101,SPLYD201 as SPLYD201,LINE as LINE From w_A120", con);
da.Fill(ds1, "w_A120");
da = new SqlDataAdapter("SELECT TEHAIKME as TEHAIKME From TMTEHAIK", con);
da.Fill(ds1, "TMTEHAIK");
//da = new SqlDataAdapter("SELECT REPKBNME as REPKBNME From TMREPAT", con);
//da.Fill(ds1, "TMREPEAT");

ReportDocument myReport = new ReportDocument();
string reportPath = Server.MapPath("~/test/A120.rpt");
myReport.Load(reportPath);
myReport.SetDataSource(ds1);
CrystalReportViewer1.ReportSource = myReport;
...全文
69 点赞 收藏 3
写回复
3 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
lo8023ve 2012-07-19
能不能帮我搞个答案啊[Quote=引用 2 楼 的回复:]
过来看答案的
[/Quote]
回复
lo8023ve 2012-07-19
急救啊
回复
相关推荐
发帖
C#
创建于2007-09-28

10.5w+

社区成员

.NET技术 C#
申请成为版主
帖子事件
创建了帖子
2012-07-19 08:49
社区公告

让您成为最强悍的C#开发者