没有扩展方法'ReportSource' [英] No extension method 'ReportSource'

查看:96
本文介绍了没有扩展方法'ReportSource'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Microsoft.Reporting.WinForms.ReportViewer''不包含''ReportSource'的定义,并且没有扩展方法''ReportSource''接受类型''Microsoft.Reporting.WinForms.ReportViewer''的第一个参数找到(你错过了使用指令或汇编参考吗?



Microsoft.Reporting.WinForms.ReportViewer'' does not contain a definition for ''ReportSource'' and no extension method ''ReportSource'' accepting a first argument of type ''Microsoft.Reporting.WinForms.ReportViewer'' could be found (are you missing a using directive or an assembly reference?

private void btnreport_Click(object sender, EventArgs e)
    {
        ReportDocument crystalRpt = new ReportDocument();
        crystalRpt.Load("C:Users\\Document\\CrystalReport1.rpt");
        crystalReportViewer1.ReportSource = crystalRpt;
        crystalReportViewer1.Refresh();
    }

推荐答案

你可以告诉我你从哪里开始g报告的数据?
can u tell me from where you are getting data for your report ?


这篇关于没有扩展方法'ReportSource'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆