本文介绍了使用多个表创建水晶报表时出错?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用桌面应用程序中的2个表创建水晶报告,在2010年。我尝试下面的代码
表单加载
I am creating crystal report from 2 tables in desktop application in vs 2010.i tried following code
on form load
DataSet ds = new DataSet();
string strSQL = "SELECT Department.Department, Employees.Name, Employees.State FROM Department INNER JOIN Employees ON Department.DepartmentID = 1";
SqlConnection con=new SqlConnection("Data Source");
SqlDataAdapter da = new SqlDataAdapter(strSQL,con);
da.Fill(ds, "DataTable1");
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load(@"path\CrystalReport1.rpt");
cryRpt.SetDataSource(ds);
crystalReportViewer1.ReportSource = cryRpt;
crystalReportViewer1.Refresh();
我收到以下错误
I am getting following error
"Could not load file or assembly 'file:///C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified."
任何帮助都会很明显
问候
any help will be appreciable
regards
推荐答案
<pre lang="xml"><startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
这篇关于使用多个表创建水晶报表时出错?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!