Posted 16 November 2022, 8:02 pm EST
- Updated 15 February 2023, 1:41 am EST
Hi Rudi,
Could you confirm if you are referring to ActiveReports 9 ‘licenses.dll’ in your ActiveReports 16 project? If yes this is an incorrect way of licensing your class library as the licensing methods have changed from ActiveReports 9 to ActiveReports 16.
In ActiveReports 16 you do not need to manually refer to any ‘licenses.dll’ file.
In order to license your Class Library please follow the below-given steps:
- Remove any reference for ActiveReports 9 licensing DLLs.
- Open the Command line and change the working directory to C:\ProgramData\GrapeCity\gclm using the command
cd C:\ProgramData\GrapeCity\gclm
- Specify a location to store your .gclicx file and run the following command to create a ‘.gclicx’ file.
gclm.exe "e88c1aa3-2781-44bb-b639-765c9ef6d15c" -lc [location_to_save_the_gclicx_file]/license.gclicx "[ExecutingAssembly].[CallingAssembly].dll"
- Copy the ‘license.gclicx’ file and paste it into any folder in your ‘MyReportAR’ project’s directory.
- Open your ‘MyReportAR’ project in VisualStudio locate the ‘license.gclicx’ file through Solution Explorer > right-click the ‘license.gclicx’ file > click on Properties.
- Set the Build Action property to Embedded Resource.
- Rebuild your class library.
Now running your MyReportService application should not throw any error.
Please make sure to set the ‘.gclicx’ file’s Build Action to Embedded Resource failure to do so will result in the similar error.
To learn more about licensing compiled code in ActiveReports 16 please refer to Licensing Compiled Code [https://www.grapecity.com/activereportsnet/docs/versions/v16/online/licensing-a-project.html].
To learn more about Licensing your project please refer to Licensing a Project [https://www.grapecity.com/activereportsnet/docs/versions/v16/online/licensing-a-project.html].
To read more about common licensing error and how to fix them please refer to Licensing Errors [https://www.grapecity.com/activereportsnet/docs/versions/v16/online/licensing-errors.html].
Please find attached a sample implementing a ‘MyReportAR’ class library with ‘license.gclicx’ file embedded to the project. And ‘MyReportService’ application using MyReportAR.dll.
- To Run the project open the project in Visual Studio.
- Right click on ‘MyReportAR’ project and click on Build to create MyReportAR.dll.
- Run the ‘MyReportService’ application. Everything should run as expected.
- Now if we change the ‘license.gclicx’ file’s (within ‘MyReportAR’ project) Build Action to None and Build the project again.
- Running the ‘MyReportService’ app will throw the error ‘This application will be terminated because it was built without a license for PageReport.’.
Regards,
Anand
Project.zip