Visual studio 在Web窗体上创建按钮以打开CrystalReportViewer

Visual studio 在Web窗体上创建按钮以打开CrystalReportViewer,visual-studio,crystal-reports,Visual Studio,Crystal Reports,我刚刚开始编写代码(我现在正在使用visual studio 2012),我现在的任务之一是从网络表单单击按钮打开crystalreportviewer,我已经创建了webform/db/crystalreport,但我不知道如何在浏览器上打开crystalreportviewer,以及如何将其链接到单击按钮 我看过很多教程/视频/博客,但仍然不知道如何解决它 任何帮助都将不胜感激 protected void Button1_Click(object sender, EventArgs e)

我刚刚开始编写代码(我现在正在使用visual studio 2012),我现在的任务之一是从网络表单单击按钮打开crystalreportviewer,我已经创建了webform/db/crystalreport,但我不知道如何在浏览器上打开crystalreportviewer,以及如何将其链接到单击按钮

我看过很多教程/视频/博客,但仍然不知道如何解决它

任何帮助都将不胜感激

protected void Button1_Click(object sender, EventArgs e)

    {
        ReportDocument cryRpt = new ReportDocument();
        cryRpt.Load("YOURCRYSTALREPORTFILE");
        CrystalReportViewer1.ReportSource = cryRpt;


    }
我已经知道了如何创建一个按钮,单击它将通过加载打开crystal报告