无法在客户端计算机中打开Crystal Report

时间:2019-12-09 13:03:35

标签: crystal-reports

我正在一个Windows应用程序项目中,该项目具有一些使用Crystal Report设计的报告。一切正常,包括开发计算机上的报告,但是如果我在另一台计算机上安装了该应用程序,则报告将无法打开。 我使用Visual Studio 2017设计了Crystal Report版本13_0_22。我下载了Crystal Report运行时,并使用此链接(https://origin.softwaredownloads.sap.com/public/file/0020000000628082019安装在客户端计算机上,我还尝试将Crystal Decision Reference属性的特定版本设置为false。 ,我尝试安装其他版本的Crystal Report运行时。 这是我的代码:

SqlDataAdapter adapter = new SqlDataAdapter();
SqlCommand cmdDataBase = new SqlCommand("PrintPV", myConnection);
cmdDataBase.CommandType = CommandType.StoredProcedure;
cmdDataBase.Parameters.AddWithValue("@startDate", pvParameters.EndDateValue);
cmdDataBase.Parameters.AddWithValue("@endDate", pvParameters.startDateValue);
cmdDataBase.Parameters.AddWithValue("@pvno", pvParameters.PVNO);
adapter.SelectCommand = cmdDataBase;
cmdDataBase.ExecuteNonQuery();
SimpcaDataSet simpcaData = new SimpcaDataSet();
adapter.Fill(simpcaData, "PvFmiti");

ReportDocument myReport = new ReportDocument();
myReport.Load(@"C:\SIMPCA\Reports\pvNetFMITI.rpt");  

然后我将报告数据复制到客户端计算机上的此“ C:\ SIMPCA \ Reports \”目录中。

1 个答案:

答案 0 :(得分:0)

很高兴我解决了这个问题,它拒绝在客户端计算机上打开Crystal报表,因为我是在AnyCPU平台/体系结构上构建的,而下载的运行时是64位。