水晶报表 折线图 图例文本

[复制链接]
查看11 | 回复0 | 2008-1-28 18:07:25 | 显示全部楼层 |阅读模式
你要引入using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Share; 命名空间 然后 ReportDocument poRpt = new ReportDocument(); poRpt.Load(fileName); SqlDataAdapter sda = new SqlDataAdapter(); sda.SelectCommand = new SqlCommand(sql, con); sda.SelectCommand.ExecuteNonQuery(); DataSet ds = new DataSet(); sda.Fill(ds, "RepairRecord"); poRpt.SetDataSource(ds); this.cryRV.ReportSource = poRpt; 就可以了,fileName是你报表的相对路径,相对于exe文件,最好把报表跟.exe文件放在一起,方便
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行