问题描述
我在c++中通过托管的代码实现的CrystalReports.以下是我的建立CrystalReports和.mdb文件的连接的方式。编译成x86运行起来是没问题的也可以正确显示mdb中的数据。但是编译成x64的就报错没办法现在需要支持x64.大家有没别的办法?我的机子上已经安装了CRruntime还有也安装了ACCESS2013。最后还安装了AccessRuntime2010都不管用。////reportDocument1//CrystalDecisions::CrystalReports::Engine::ReportDocument^reportDocument=(gcnewCrystalDecisions::CrystalReports::Engine::ReportDocument());CStringreportFilePath=L"rassdk://"+GetAppPath()+L"\CategoryOverview.rpt";reportDocument->FileName=gcnewSystem::String(reportFilePath);//Tellitwherethedatabaseis.CrystalDecisions::CrystalReports::Engine::Database^database=reportDocument->Database;CrystalDecisions::CrystalReports::Engine::Tables^databaseTables=database->Tables;CrystalDecisions::Shared::ConnectionInfo^connectionInfo=(gcnewCrystalDecisions::Shared::ConnectionInfo());CStringdatabaseLocation=GetAppPath()+_T("\ExternalDataFilesReadinVariablesUsedinArrivalSchedules.mdb");connectionInfo->ServerName=gcnewSystem::String(databaseLocation);CrystalDecisions::CrystalReports::Engine::Table^databaseTable=databaseTables[0];CrystalDecisions::Shared::TableLogOnInfo^tableLogonInfo=databaseTable->LogOnInfo;tableLogonInfo->ConnectionInfo=connectionInfo;databaseTable->ApplyLogOnInfo(tableLogonInfo);
解决方案
解决方案二:
菜鸟求助。没人吗。