Saturday, August 22, 2009

Licensing ActiveReports 6

Licensing with ActiveReports has been one of the biggest pain in the butt"est" topic that I have ever seen. Even though in concept, licensing is a very simple thing to accomplish, people continue to run into issues. One of the most common complaints has been "Everything works fine on my development machine, but when I deploy the application to production server I get the red evaluation banner in report documents". This drives people nuts and immediate assumption is made that ActiveReports is at fault. If a little bit time is spent in understanding how licensing works, it will make people's life lot easier. In general following ActiveReports Licensing documentation should be enough to resolve most of these issues.

ActiveReports uses standard .Net methodologies of licensing a component. There are no intentions to re-invent the wheel. It is there and it runs fine.

To start with, you get into licensing if you like a product. I would recommend that you install ActiveReports 6, mess with it and then decide. Email if you have any questions and GrapeCity support team will help you out. You can also post on the ActiveReports 6 forum if you want. Support is free. If you do decide to buy the product, and after all the etcs. and etc., you will have a serial number issued to you by GrapeCity. You are now ready to license ActiveReports 6. If you already have a build installed, run the installer again and select "License ActiveReports 6" option. You enter your name, email and serial number that you would have already received from GrapeCity, hit "Next" and you are good to go.

In order to create a license.licx file in Visual Studio, create a new WinForm project, add ActiveReports 6 template from "Add New Item". If the machine is licensed, a license.licx file is created in the project. If you open the file in TextPad, 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

You need to 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 same file if you are using other licensed components in your project. Make sure the "Build Action" on license.licx is set to "Embedded Resource". Select the license.licx file in solution explorer and see the properties. First property listed is "Build Action"

You design your reports, run them and the red evaluation banner is gone from the bottom of each page that is generated in report's document.

Now is the time to deploy. By that I mean that you will either send the executable to your client or to whoever you want to. Important point here is that it will NOT be run on your machine. Your client's machine does not has ActiveReports 6 installed. All they want to see is the reports WITHOUT the red evaluation at the bottom of each page.

To make sure license is embedded in the executable, "Rebuild" (Alt+Shift+B+R") the solution. If you don't have reflector, download it. 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 got messed up and you need to re-build the solution.

If license.licx doesn't exist or did not get generated for some reason, you can add it manually. Create a file named license.licx in TextPad/NotePad/etcs, add the component information as I mentioned above(one per line) and include it in the project. It can go in the root folder or in the 'My Project" folder for the project. Again, make sure the "Build Action" is set to "Embedded Resource"

That is it..zip up the exe and the dependent dlls and you are good to go. WinForms are simple and the above holds true for Web Application projects too.

And then..there are WebSites.

ActiveReports file 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 anywhere you want to, but the "View Designer" option will not be available. 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. 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"


For website project, license.licx has to be in the root of website.


Lesson learnt from above is that 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 desing view, license.licx gets generated.

Since I have professional edition of ActiveReports 6 installed on my machine, I dragged WebViewer control that comes with ActiveReports 6 on to an aspx page from the toolbox and license.licx was generated. At the same time, App_Licenses.dll is also created in the bin folder. When you deploy websites, App_Licenses.dll also needs deployed on the production machine. it has to be in the bin directory in the root of the website. 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.

I have read somewhere that VS2008 initial release will screw this up(App_Licenses.dll gets corrupted somehow), so I guess you should move on to SP1.

Another scenario involves creating licensed application when no visual studio is involved. I would suggest getting familiar with lc.exe and the various flags that you can use to create .licenses file that can be embedded as a resource in an executable. I personally prefer command line, but majority of the users hate it, so I will stay away from it too. I couldn't find how to generate App_Licenses.dll for website projects using lc.exe. Is it possible?

References: Robert Dupuy has done a great job with these 2 articles. Part 1 and Part 2

28 comments:

Anonymous said...

[ ... ] link is being shared on Twitter right now. @zenx, an influential author, said RT @1ndus: Xtreme [ ... ]

Anonymous said...

Heya


You will not believe what I just found! [url=http://www.foolioo.com]Foolioo.com[/url] makes [url=http://www.foolioo.com]free[/url] custom website for free. Yep! That's right, FREE!
Never imagined it'd be so easy to get a free website and I really had to tell you guys.



So if you're looking for a free website, give these guys a try.



Good Bye

Unknown said...

What happens if you see the imbedded license file in the EXE and you STILL get the warning? I have one project like this and I cannot get the warning to go away.

Anonymous said...

paul mcgillion dating http://loveepicentre.com/map.php dating dog

Anonymous said...

jenna black ebook free http://audiobooksplanet.co.uk/How-to-Start-a-Business-in-Georgia/p227645/ creatura ebook [url=http://audiobooksplanet.co.uk/fr/Saxon-Stories-The-Last-Kingdom/p29887/]ebook topics[/url] masteringbiology 8 e ebook

Anonymous said...

blue ay copying software http://buyoemsoftware.co.uk/it/product-37122/Pdf2Word-2-1 win xp software for weather [url=http://buyoemsoftware.co.uk/product-14003/GyazMail-1-5-Mac]wordperfect free software[/url] adobe software as a service
[url=http://buyoemsoftware.co.uk/product-31618/MovCaptioner-3-6-MAC]MovCaptioner 3.6 MAC - Cheap Legal OEM Software, Software Sale, Download OEM[/url] manufacturing software development
[url=http://buyoemsoftware.co.uk/de/product-35362/3herosoft-DVD-to-PSP-Converter-3-5-MacOSX][img]http://buyoem.co.uk/image/3.gif[/img][/url]

Anonymous said...

I think what you posted was very reasonable.
But, consider this, what if you wrote a catchier post title?
I ain't suggesting your information isn't good., however what if you added something that makes people desire
more? I mean "Licensing ActiveReports 6" is kinda vanilla.
You ought to glance at Yahoo's home page and see how they create news headlines to grab people interested. You might try adding a video or a related picture or two to grab readers excited about everything've
got to say. Just my opinion, it could make your blog a little livelier.


Here is my web-site; easy diets that work
My site :: diets that work for women

Anonymous said...

When I originally commented I appear to have clicked the -Notify me when new comments are added- checkbox and from now on every time a comment is added I recieve 4 emails with the same comment. Is there a means you are able to remove me from that service? Thanks!|
[url=http://instantonlinepayday.co.uk/]pay day loans uk
[/url]

Anonymous said...

[url=http://certifiedpharmacy.co.uk/products/zelnorm.htm][img]http://onlinemedistore.com/10.jpg[/img][/url]
epainmedsglobal reviews order barry pharmacy waiting http://certifiedpharmacy.co.uk/products/atacand.htm texas pharmacy board complaints [url=http://certifiedpharmacy.co.uk/products/citalopram.htm]feris pharmacy greece ny[/url]
gladson pharmacy design http://certifiedpharmacy.co.uk/products/carafate.htm prosperity pharmacy [url=http://certifiedpharmacy.co.uk/products/triphala.htm]triphala[/url]
nationally certified pharmacy tech programs http://certifiedpharmacy.co.uk/products/advair-diskus.htm federal statute pharmacy open to public warehouse club [url=http://certifiedpharmacy.co.uk/products/estrace.htm]optioncare specialty pharmacy division[/url]
health e pharmacy http://certifiedpharmacy.co.uk/products/luvox.htm martin avenue pharmacy [url=http://certifiedpharmacy.co.uk/products/paxil.htm]paxil[/url]

Anonymous said...

[url=http://certifiedpharmacy.co.uk/categories/erection-packs.htm][img]http://onlinemedistore.com/1.jpg[/img][/url]
canadian pharmacy discount code http://certifiedpharmacy.co.uk/products/metoclopramide.htm dan heller pharmacy [url=http://certifiedpharmacy.co.uk/products/menosan.htm]diabetes medication pharmacy[/url]
online pharmacy ratings http://certifiedpharmacy.co.uk/products/kamasutra-contoured-condoms.htm university of iowa college of pharmacy [url=http://certifiedpharmacy.co.uk/products/proscar.htm]proscar[/url]
pharmacy sales http://certifiedpharmacy.co.uk/products/relafen.htm dod pharmacy [url=http://certifiedpharmacy.co.uk/products/serophene.htm]shopko pharmacy belvidere il[/url]
good life pharmacy http://certifiedpharmacy.co.uk/products/parlodel.htm abbot labs pharmacy [url=http://certifiedpharmacy.co.uk/products/methotrexate.htm]methotrexate[/url]

Anonymous said...

I like [url=http://www.nikeshop.ca/]Nike[/url] and http://www.nikeshop.ca/2xrjaluj

Anonymous said...

I am sure this article has touched all the internet viewers, its really really good
article on building up new web site.

Feel free to visit my website: the tao of badass

Anonymous said...

death note dating game http://loveepicentre.com/taketour/ acww dating
german american dating [url=http://loveepicentre.com/success_stories/]single mom dating[/url] free youth dating sites
speed dating age groups [url=http://loveepicentre.com/success_stories/]who is dating ruch limbaugh[/url] adult punk dating [url=http://loveepicentre.com/user/swaggaariyo/]swaggaariyo[/url] one night stanz dating

Anonymous said...

The appeal of how to get rid of acne scars. Remember we are trying
to search for the right how to get rid of acne treatment products.
Sounds like a funny product to use, that you can to
prevent the skin on the bottom of the heap. Tokyo is the city where otaku, a type
similar to the way I stated it is that women get affected more with how to get rid of acne when you
obtain the skin you've always dreamed of.

Anonymous said...

Јe ѕuіs agée dе quаrаnte-cinq ans .

Mon nοm eѕt Eugenia.
Ϲe quе je fаis , webmasteur . On dit souvent de moi que је suis rеvêche.


Also viѕit my blοg post :: Hotels

Anonymous said...

buy tramadol buy tramadol 50mg online - tramadol 37.5

Anonymous said...

Good site you have got here.. It’s hard to find good quality writing like yours nowadays. I seriously appreciate individuals like you! Excellent post, always be connecting! Take care!

software company in lahore

Anishi Ganatra said...

Amazing post. Thanks for sharing about Licensing Active Reports. Since I am working with product development company and providing Embedded System Design service and hardware design services. Like to forward this informative post with students, who are come to seek for project training with us.

Unknown said...

Camtasia Studio 9 Crack is a famous multimedia software. It lies in the best categories of video editing softwares. It is used by million of users because of its interesting missions and tasks. We are providing the complete version of Camtasia Studio 9 Crack on our website for our respected visitors. You can also download this interesting game from our website.

Unknown said...

Adobe Illustrator CS6 is a famous Graphic Designing software. It lies in the best categories of Graphic softwares. It is used by million of users because of its interesting missions and tasks. We are providing the complete version of Adobe Illustrator CS6 on our website for our respected visitors. You can also download this interesting game from our website.

Unknown said...

McAfee Antivirus Plus 2017 is a perfect anti malware software. It lies in the best categories of malware protection products. It is used by million of users because of its effective and excellent working. We are providing the complete version of McAfee Antivirus Plus 2017 on our website for our respected visitors. You can also download this interesting game from our website.

Unknown said...

Adobe Dreamweaver CS6 Crack is a perfect graphic designing software. It lies in the best categories of adobe products. It is used by million of users because of its effective and excellent working. We are providing the complete version of Adobe Dreamweaver CS6 Crack on our website for our respected visitors. You can also download this interesting game from our website.

crackstools said...

Your website content is very effective and help full for people.I understood that you try to clear that concept about this subject.But i also read another content from another website. I think it's most better full content to your website content.So i suggest you, if you have a time to on your hand you will try to visit this website.Paragon NTFS For Mac 15 Crack Full Download With Serial Key

Unknown said...

***(Flash Sale For Up to 50% Off)***
If you are looking for Desi, exotic & stylish Pakistani Dresses styles at affordable prices then look no further than
Mahma Saleem.

Mahma Saleem is offering FLASH Sale for up to 50% off on all (Ready To Wear Dresses/Kurtis). With such a wide variety of attractive and trendy clothes on sale... This is your best chance to grab the Pret Designer Wear of your choice at such affordable prices and make a style statement this summer.

Happy Shopping Guys !!! =)

Unknown said...

***(Flash Sale For Up to 50% Off)***
If you are looking for Desi, exotic & stylish Pakistani Designer Wear styles at affordable prices then look no further than
Mahma Saleem.

Mahma Saleem is offering FLASH Sale for up to 50% off on all (Ready To Wear Dresses/Designer Wear). With such a wide variety of attractive and trendy clothes on sale... This is your best chance to grab the Pret Designer Wear of your choice at such affordable prices and make a style statement this summer.

Happy Shopping Guys !!! =)

ahmadnurhadirmw said...

Good posts, here I offer free software idd-files idd-files.blogspot.com

Fitness. Anytime, Anywhere. said...

GoXtraFit is an on demand fitness network that connects fitness professionals and clients. We are revolutionary to the busy lives we all lead, which makes getting regular exercise and proper nutrition effortless.

remove background from gif photoshop said...

Hey,
Great tips sir.
Writing a blog post is really important for growth of your websites.Thanks for sharing amazing tips. Following this steps will transform the standard of your blog post for sure.