|
How to license ActiveReports 6 projects.
ActiveReports 6 uses standard .NET paradigm for licensing and deploying applications containing ActiveReports 6 reports..
- How to license ActiveReports 6 on your machine:
- ActiveReports 6 License Agreement for usage and distribution of ActiveReports assemblies and files.
ActiveReports 6 can be designed in a Windows Forms, Web Application and Website projectd in Visual Studio. It uses the standard licensing methodologies as provided through Visual Studio and the .NET framework and API.
Windows Forms projects:
In a Windows Forms project in Visual Studio, add ActiveReports 6 template from "Add New Item" to the project. If the machine is licensed, a license.licx file, if not present already, is created in the project. You will see one line, containing information about type, Assembly, Version, PublicKeyToken (in that order). Here is an example:
- DataDynamics.ActiveReports.ActiveReport, ActiveReports6, Version=6.0.1000.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
Few other things:
- Make sure that version information for the ActiveReports6 dll is correct in case you upgraded to a hotfix
or service pack.
- There might be other listings in the licenses.licx if you
are using other licensed components in your project.
- Make sure the
"Build Action" on licenses.licx is set to "Embedded Resource".
- Select the licenses.licx file in solution explorer and look at the properties. First property listed is "Build Action"
At this time, you design your reports, compile the application, run the reports and the red evaluation banner is gone
from the bottom of each page in the report's document.
Embed license: To make sure license is embedded in the executable, "Rebuild" (Alt+Shift+B+R") the solution on your machine. If you don't have reflector, download it from here. Open the executable in reflector, expand the node for your application and you will see a file named MyApp.exe.licenses
("MyApp" being the project name) embedded under "Resources". If you
double click on it in the reflector, you can also see some textual
information on what is in there. If you don't see the .licenses under "Resources", something didn't happen right and you will need to re-build the solution.
How to deploy this application:
Deploying an application means that you will either send the executable
to your client or to your customer or move it to a server or some other machine. Important point to note here is that
it will not be run on your machine. Your client's machine does not has ActiveReports 6 installed and you want to make sure that when the application is run from this other machine, reports reder without the red evaluation at the bottom of each page.
Once you have verified that the license has been embedded, you take the executable and the dependencies associated with it, lets say "application" and move it to a server, deploy on IIS, send it to your clients or any other ways you ship it for real works usage.
This is all that needs done when it comes to a windows forms project.
WebApplication projects: Web application projects functions just the same as winform and there is no extra step needed to be done.
Website projects: Licensing Website projects:
ActiveReports file/templates in Website projects: In a website project containing ActiveReports, report files(rpx template and/or code behind cs/vb files) by default goes inside the App_Code folder, when added through "Add New Item" since it is an external class/type. You can choose to put it in any other folder you want to, but the "View Designer" option will not be available to view the report in design view.
Report has to open in design view in IDE for license.licx to get auto-generated. In winform/web application projects, it happens by default when you add the report from "Add New Item". In website projects, once the report gets added to App_Code folder, you will have to right click on the report and click on "View Designer". Once the report opens in design view, license.licx gets generated.
License.licx: License.licx will get generated if the report opens in design view. So, right click on report file in the solution explorer, select 'View Designer". You will notice that license.licx gets generated in root folder. For a website project, license.licx has to be in the root of website project.
Context menu on license.licx (right click on this file) will now have a "Build Runtime Licenses" option. Also, if license.licx file is selected in Solution Explorer, Build menu will have an option for "Build Runtime Licenses".
Selecting this option will generate an App_Licenses.dll in the bin folder of the website project. Now, for some reason, if you happen to delete this App_Licenses.dll, you can regenerate it by right clicking on the licx file and selecting "Build Runtime Licenses" option. It will re-create the App_Licenses.dll in the bin folder.
Deploying websites in a production environment: App_Licenses.dll also needs deployed on the production machine. It has to be in the bin directory in the root of the website deployed in production.
Few scenarios that are a little bit different:
- If your
reports are in an external dll, say "MyReports.dll" and this dll is
referenced in another project, say "Main.exe" which calls into the
reports in this "MyReports.dll", both "MyReports.dll"and
"Main.dll" needs licensed. So the license.licx file in both the
projects should contain entry for ActiveReports components.
- If
you are using a build machine to compile these reports and create a
setup, you will need to get in touch with GrapeCity, so that we can
provide you with appropriate steps and files to have these build
machines licensed.
- In addition to the above step, if the build
machine doesn't has Visual Studio installed and you are using "msbuild"
or "csc" or a third party tool to create the installer containing the
executable that has reports, you will need to use lc.exe to create .licenses file and then run csc to emebded license in the executable.
Applies To: ActiveReports 6
|