打包的时候,要把水晶报表的注册码也给打进去原理:
用 Microsoft Installer (MSI)在您的安装包中包括的合并模块 (MSM) 分发。
MSI 合并模块(MSM)可在“C:\Program Files\Common Files\Merge Modules”目录中找到。
合并模块(MSM)分为三类:托管组件、数据库访问和密钥号码。
托管组件 MSM 处理所有托管组件的分发,其中包括 Windows 窗体查看器、Web 窗体查看器和所有 Crystal Decisions 命名空间。对于使报表运行所需的所有其他文件,由数据库访问 MSM 处理其分发。其中包括数据库、导出和图表驱动程序。KeyCode MSM 处理 Crystal Decisions 密钥号码的安装,这样您的用户在查看报表时,就不会被要求注册他们的 Crystal版本。具体操作步骤:
1)新建“安装和部署项目”-->“安装向导”
2)选择项目类型(这里选“创建用于windows应用程序的安装程序”)-->下一步
3)选择要包含的文件:添加你的程序文件 + C:\Program Files\Common Files\Merge Modules下的managed.msm、managed_chs.msm、database_access.msm、database_access_chs.msm、regwiz.msm、VC_CRT.msm、VC_STL.msm。-->完成具体功能如下:
managed.msm、managed_chs.msm、(托管组件 MSM 处理所有托管组件的分发,其中包括 Windows 窗体查看器、Web 窗体查看器和所有 Crystal Decisions 命名空间)
database_access.msm、database_access_chs.msm、(对于使报表运行所需的所有其他文件,由数据库访问 MSM 处理其分发。其中包括数据库、导出和图表驱动程序。)
regwiz.msm、(KeyCode MSM 处理 Crystal Decisions 密钥号码的安装)
VC_CRT.msm、VC_STL.msm(这个在msdn上绝对没提起,是vc的运行库,估计是Crystal Report或涉及到的某些程序是用vc写的,所以需要它!)4)打开解决方案-->右键点击regwiz.msm的属性,在“MergeMouduleProperties”里的“License Key”填入:AAP5GKS0000GDE100DS(这个是你生成Crystal Report是用到的注册号的密码!)
5)生成解决方案(或直接按Ctrl+Shift+B)

解决方案 »

  1.   

    to glboy(星毅) 
    那些文件我已经包含到打包文件里去了,所以一开始那个打印是没有问题的。
    但是后来我把那个报表里加了一些公式进去,结果就不行了,但是其他报表还是没有问题的!!这是怎么回事?
      

  2.   

    原因就是:When reports are added to a .NET Windows or Web applications, they are
    added by default as an “Embedded Resource” for the application. What this
    means is that the report will be compiled into the assembly’s manifest, and will
    not be loaded from a separate report file (.RPT).
    This allows .NET applications to be distributed and deployed without having to
    distribute report files separately. The advantage of doing this is that applications
    do not have to deploy external report files and end users cannot modify them.
    The disadvantage is that if a report needed to be modified, the entire application
    will need to be recompiled and redeployed for the report changes to be saved.
      

  3.   

    to  glboy(星毅)
    这个具体该如何处理?
    我确实已经重新编译啦,还要怎么样阿???
      

  4.   

    重新编译,然后再重新打包,是否可以了?如果是部署到WIN98,WIN ME环境,还需再参考:
    http://support.crystaldecisions.com/kbase/c2011640.asp
      

  5.   

    to  glboy(星毅)
    现在搞订了,原来是我们数据库视图改变过几次,客户哪没有被更新成最新的版本:)
    现在更新了一下视图就可以啦!
    不过它那样的提示确实容易让人以为是水晶报表打包的问题