有的用户在评估产品期间使用 ActiveReports 设计了部分报表模板,为了在激活 ActiveReports 产品之后能够继续使用已经创建好报表模板,我们需要为原有代码添加 ActiveReports 产品授权。
注意:此方法同样适用于进行 ActiveReports 产品升级情况。
详细操作步骤如下:
1、通过 操作系统 -> 开始菜单 -> 所有程序 –> ComponentOne 目录下的 License Manager 工具,查看当前开发电脑是否正确激活了 ActiveReports 8 产品
2、第一步确认当前电脑已经正常激活之后,请按照以下操作为你的源代码工程添加 ActiveReports 产品授权
2.1、打开使用了 ActiveReports 控件的工程,包括添加过区域报表(SectionReport)、页面报表(PageReport)和报表浏览器控件(Viewer),删除工程中 Properties 目录下的 licenses.licx 文件(注意,如果 licenses.licx 文件中有 ActiveReports 之外的信息,请先将这些信息拷贝到文本文件中进行备份),删除引用目录下中 ActiveReports 相关的全部 DLL
2.2、在工程中添加新的ActiveReports报表文件,需要添加区域报表(SectionReport)、页面报表(PageReport)
2.3、新建一个窗体,并在该窗体上添加 Viewer 控件
2.4、检查2.2和2.3操作之后,是否为你的工程自动添加 ActiveReports 相关的 licenses.licx 文件和所有 DLL 引用,此时license文件信息如下:
GrapeCity.ActiveReports.Viewer.Win.Viewer, GrapeCity.ActiveReports.Viewer.Win.v8, Version=8.0.168.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
GrapeCity.ActiveReports.SectionReport, GrapeCity.ActiveReports.v8, Version=8.0.168.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
GrapeCity.ActiveReports.PageReport, GrapeCity.ActiveReports.v8, Version=8.0.168.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
3、如果你的解决方案中有多个工程都使用到 ActiveReports 控件,需要为使用了 ActiveReports 的全部项目进行第二步操作
4、如果你的解决方案中有多个工程,并且把 ActiveReports 报表全部放到了某一个工程中(ProjectA),然后在其它工程(ProjectB、ProjectC、ProjectD... ...)中引用 ProjectA 生成的DLL,这种情况需要为所有引用了 ProjectA.dll 的工程添加 ActiveReports 产品授权,添加方案请参照第二步