-1

Am trying to load a rpt file using c#. I have used the following code.

using System;
using CrystalDecisions.CrystalReports.Engine;   
using CrystalDecisions.Shared;
namespace Report
 {  
     public partial class Report : Document    
  {    
   public void ReportLoad()    
   {        
     ReportDocument reportDocument = new ReportDocument();       
     string filePath = "D:\\crosstabReport.rpt";           
     reportDocument.Load(filePath);  
     crystalReportViewer.ReportSource = reportDocument; 

   } 

But am getting a error like ''The name 'crystalReportViewer' does not exist in the current context''.

Any suggestions???

Thanks in advance!!!!

4

1 回答 1

0

当前上下文中不存在名称“crystalReportViewer”

这意味着该范围内不存在变量 crystalReportViewer。检查您已声明的名称并在此处替换它。

于 2013-08-20T08:59:45.180 回答