在部署WinForm应用程序时,常遇到License 报错问题,如图;这是因为在项目中添加Pagereport或Section Report项,未生成对应的License 记录,需要手动添加,重新编译之后,再次发布。
1. 打开项目中的Properties 目录下的licenses.licx文件,会看到有一行记录,如下
GrapeCity.ActiveReports.Viewer.Win.Viewer, GrapeCity.ActiveReports.Viewer.Win.v10, Version=10.0.6385.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
缺少对其他报表项的声明,所以导致在部署机器中报错,因此需要我们手动添加记录
2. 在Licenses.licx 文件中手动添加:
GrapeCity.ActiveReports.SectionReport, GrapeCity.ActiveReports.v10,Version=10.0.6385.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
GrapeCity.ActiveReports.PageReport, GrapeCity.ActiveReports.v10,Version=10.0.6385.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
其中四项对应的是:类名, DLL 引用名, 版本号,Culture,PublicKeyToken(后面三项可直接复制Win.Viewer中的值)
3. 添加完成后,重新编译。
4. 部署到其他机器中,确保所有DLL 引用文件都被拷贝
相关资源:
注意
如需寻求在线帮助,请访问 ActiveReports 求助中心
如需了解更多ActiveReports产品特性,请访问 ActiveReports 官方网站
ActiveReports 官方技术交流群:109783140
下载产品体验产品功能:http://www.gcpowertools.com.cn/products/download.aspx?pid=16