我用C#编的程序,用自带的水晶报表作了几个报表,打包时一切正常,完成后用打包文件安装再另一台没有.net环境,也没有水晶报表的机子上,系统2000server,安装正常,运行后其他部分正常,但所有和报表有关的部分均弹出错误提示!说缺少文件,提示如下:
Cannot find KeycodeV2.dll,or invalid keycode 
我从原机子找到这个文件,靠到执行文件的目录下后,仍然报这个错误
不知道怎么才能把这个文件加载到我的系统中去。。
急啊,要过年了啊等着交差呢。

解决方案 »

  1.   

    向Crystal网站申请序列号,然后在VS中输入序列号。  
    放心,免费的。
      

  2.   

    http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=122464
      

  3.   

    水晶报表10的官方打包说明:http://support.businessobjects.com/fix/merge_modules.asp
    先在这里下载10的合并模块,(应该是下载这个版本的cr10_net_merge_modules)
    --------------------------
    1.In Visual Studio .NET, open your Web application, go to the View menu, and select Solution Explorer.  Right-click your Web application solution and from the pop-up menu, select Add then click New Project.
    2.The Add New Project dialog box appears. Select Setup and Deployment Projects in the left pane and select Web Setup Project in the right pane. Click OK.
    3.In the Solution Explorer, right click the Web Setup Project and select Add then click Project Output.
    4.The Add Project Output Group dialog box appears. Select Primary Output and Content Files to add to your Web Setup project.  
    (NOTEWhen the Primary Output is added to the project, several Crystal Reports detected dependencies will be added.  
    Select all of the Crystal Reports dependencies and right-click on the highlighted files and select ‘Exclude’ so that these files are not installed on the target machine.)5.In the Solution Explorer, right-click the Web Setup project and select Add then click Merge Module.
    6.The Add Modules dialog box appears.  Select the appropriate merge modules (See section above titled Crystal Reports 10 Merge Modules) and add them to your project.  Click OK.*** Steps 7 and 8 are for CrystalReports10_NET_EmbeddedReporting.msm only ***7.From your Setup project, select the Crystal Reports merge module (you just added) to display the properties.
    8.Expand the MergeModuleProperties and enter a valid license key the in Keycode Properties box. The license key is the alphanumeric string you receive when registering Crystal Reports. This is mandatory when you deploy a Crystal Reports for Visual Studio .NET application using CrystalReports10_NET_EmbeddedReporting.msm.
    (NOTEA license key will be given to you once you have registered Crystal Reports for Visual Studio .NET.  
    You can also find the license key by opening VS .NET and going to the 'Help' menu and selecting 'About…'.  Under the 'Installed application list' is the license key for Crystal Reports 10 for Visual Studio .NET.)9.To build your Web Setup project, highlight your deployment package (websetup1) in the Solution Explorer, right-click and select Build. You are now ready to deploy your ASP.NET Web application.
      

  4.   

    如果你用的不是10,在上面的网址中下载对应的版本的模块。然后看里面的《Deploying Crystal Reports 9.x for .NET.doc》文件,里面都有详细的说明
      

  5.   

    crystal_managed2003.msmCrystal_regwiz2003.msm在打包里要加载水晶报表依赖项然后注册一下!!~
      

  6.   

    napsoft(乡下人):注册,你指水晶报表本身吗,我好像注册过了,
    还是加入Crystal_regwiz2003.msm后,要注册,加入Crystal_regwiz2003.msm后提示我
    Setup.vdproj 属性“License Key”不可为空.....
    我没找到地方添“License Key”啊
      

  7.   

    我的是加了6个水晶报表文件,在注册下
    水晶报表9的注册码 AVS50-81SG00S-G61002U
    我随便问下,你的水晶报表的打印纸张怎么设置。我的走纸张不准。谢谢
      

  8.   

    http://dev.csdn.net/article/76324.shtm
      

  9.   

    http://support.businessobjects.com/fix/merge_modules.asp
      

  10.   

    Crystal_regwiz2003.msm  属性里面 MergeModuleProperties 点开里面需要输入License Key。
    License Key在  帮助---关于MicroSoft Development Environment 里面,输进去即可。
    2003需要添加合并模块:
    Crystal_Database_Access2003.msm 
    Crystal_Database_Access2003_enu.msm 
    Crystal_Managed2003.msm 
    Crystal_regwiz2003.msm 
    VC_User_CRT71_RTL_X86_---.msm (被基于 ADO.NET 的报表使用) 
    VC_User_STL71_RTL_X86_---.msm (被基于 ADO.NET 的报表使用) 
      

  11.   

    楼上的应该将Crystal_regwiz2003.msm属性里面 MergeModuleProperties 的License Key输入注册码
      

  12.   

    请问licence key  是水晶报表的key吗
      

  13.   

    呵呵 兄弟 我也遇到 同样的问题  哎~~  水晶报表垃圾   我恨死它了你真幸运 (打包的时候记得把你的摸版文件夹打入)
    我做了两个安装包。包一:1、打开VS.NET,新建-》项目-》安装部署项目,选“安装项目”2、项目生成后,用鼠标右击安装项目,选“添加”-》“合并模块”3、选择以下合并模块:
    Crystal_Database_Access2003_chs.msm
    Crystal_Managed2003_chs.msm
    Crystal_regwiz2003.msm
    DotNETCrystalReports.msm这时项目会自动检测到依赖项:
    Crystal_Database_Access2003.msm
    Crystal_managed2003.msm注意:标有2003字样的合并模块需要安装了VS.NET2003才有。我自己的机器是WIN2000,VS.NET2002,装有水晶报表9.2,
    而我同事的机器是WIN2003,VS.NET2003,他的水晶报表跟我的是同一张安装盘,但彼此的合并模块居然不一样!4、然后编译、生成
    包二:1、打开VS.NET,新建-》项目-》安装部署项目,选“安装项目”2、项目生成后,用鼠标右击安装项目,选“添加”-》“合并模块”3、选择以下合并模块:
    reportengine_chs.msm, 
    crnetruntime_chs.msm 
    license_chs.msm 
    mapping_chs.msm (可选,当在报表中使用了geographic maps时) 
    VC_CRT.msm、VC_STL.msm( 如果您部署的 Windows 应用程序使用 ADO.NET 数据集,则还需要包括 VC_CRT 和 VC_STL 合并模块)注意:以上合并模块需要到crystal的官方网站support.crystaldecisions.com下载一个包cr9netmergemodules_chs.zip。4、然后编译、生成在部署机器上依次安装包一、包二,问题得以解决。注意如果之前有安装其他包,请务必卸载净尽再安装这两个包。有意思的是,两个包都安装好后,
    将包一卸载,水晶报表仍然运行正常。不知道什么原因。或许将两个包的内容合在一起也可以?我实在没有兴趣和机器再去测试了。如果有人试验过,不防告诉大家。我讨厌水晶报表。
    http://www.51www.info/asppost4/web22878.htm
      

  14.   

    打一个包就够了,可以参考以下文章(注:文字来自landlordh,做的很好):1)新建“安装和部署项目”-->“安装向导”2)选择菜单中 项目-->添加-->文件(这里选“创建用于windows应用程序.exe”)-->打开3)一般会自动将依赖项添加到“检测到的依赖项”,如果没有,那么我们要手动将其加入4)
    Crystal_Managed2003.msm     (如果有水晶报表)
    dotnetfxredist_x86.msm      (.net一定是必须的)
    ...                         (如果有引用其他的dll)
     
    4)手动加入要包含的文件:项目-->添加-->合并模块(添加你的程序文件) (包括dotNetFramework和MDAC27)
    位于:C:\Program Files\Common Files\Merge Modules\ 下,*为必要的具体功能如下:
    (托管组件 MSM 处理所有托管组件的分发,其中包括 Windows 窗体查看器、Web 窗体查看器和所有 Crystal Decisions 命名空间)
    * Crystal_Managed2003.msm
      Crystal_Managed2003_chs.msm(对于使报表运行所需的所有其他文件,由数据库访问 MSM 处理其分发。其中包括数据库、导出和图表驱动程序。)
    * Crystal_Database_access2003.msm
      Crystal_Database_access2003_chs.msm(KeyCode MSM 处理 Crystal Decisions 密钥号码的安装,注意是添加合并模块,否则没有“MergeMouduleProperties”属性)
    * Crystal_regwiz2003.msm(如果报表文件使用了 ADO.NET 的 dataset 数据集对象,那么 VC_User_CRT71_RTL_X86_---.msm 和 VC_User_STL71_RTL_X86_---.msm 模块也必须包含在安装工程中。
    而且这两个模块的文件安装属性的"Module Retargetable Folder"项必须修改成为系统目录)
      VC_User_CRT71_RTL_X86_---.msm
      VC_User_STL71_RTL_X86_---.msm
      (很多人经常出现查询错误,不妨加上这个)5)打开解决方案-->右键点击Crystal_regwiz2003.msm的属性,在“MergeMouduleProperties”里的“License Key”填入:AAP5GKS0000GDE100DS(这个是你生成Crystal Report是用到的注册号的密码!)6)生成解决方案(或直接按Ctrl+Shift+B)
      

  15.   

    水晶报表注册码 
    注册号:6707437608 
    密码:AAP5GKS0000GDE100DS 
    注册一下试试