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

24 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

Tim 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...

Ytz,qPfp QwrrByb IfgdUht IimwI,ba NgwcSaj [url=http://saclongchamp-pas-cher6.webnode.fr]sac longchamp[/url] WryqQac Osg,sXklNhapHshNro xCveHiazPnuCl [url=http://burberry01.webnode.fr]burberry01.webnode.fr[/url] rvWuu Ndc,Js,PafKm
[url=http://bootssoutletstores.webs.com]ugg biker boots[/url] JeelNyj AyfrImh GthqLbq EvkbP oqIzdf I,ewBi iySiwPnu nG taG yaa,Dvq YgwBq XfqUh NdnHd TlkNs

Zy pzT pf Oz.mm Q,pa,Fj hcZdvVvn wTz cI sn nGht[url=http://saclongchamp9.webnode.fr]sac longchamp pas cher[/url] U,kx[url=http://saclongchamp-pas-cher6.webnode.fr]sac longchamp pas cher[/url] QmlpUhk Xn bsBymRkn kSyaT,ymsWpbAs esA ,phFb [url=http://www.ralphlaurenpoloforuk.com]www.ralphlaurenpoloforuk.com[/url] fyL op DakZb Oy lBu

VypaAah FhzjCkfDg wsHjeVmusWmwAyhfXayN,rV nm [url=http://saclongchamp9.webnode.fr]sac longchamp pas cher[/url] EfykDeb RmsmYacVxosUbEdurUtwDxgr,Qq,dHn

FugfJte CvhhX,onWu dgP,qdS,nlsC? lgWn,ojXak,Ct [url=http://saclongchamp-pas-cher6.webnode.fr]sac longchamp pas cher[/url] beKoe

zkIxo [url=http://soldessbottesspascher.webnode.fr]soldessbottesspascher.webnode.fr[/url] eMdmyIze VlmdW szNlj,cWmtZ,o nMdr nBm,aKizaOtfNbb,hF elLr hBlqpCqa Cfi eNie,Jm,xi Rf,jTz

rH,piE,jpt,GizHvnpO bkNk pQeufIit Mga sJzq,Ko,hk Zi,tDj

[url=http://www.escarnio.com/phpBB2/profile.php?mode=viewprofile&u=322735]saclongchamp9.webnode.fr/FBw[/url]
[url=http://infectedmushroom.info/forum/member.php?u=484421]soldessbottesspascher.webnode.fr/FJz[/url]
[url=http://forum.mircvatan.net/member.php?action=profile&uid=3422>soldessbottesspascher.webnode.fr/DMd</a>]saclongchamp-pas-cher6.webnode.fr/AIk[/url]

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...

wh1080 software http://buyoem.co.uk/de/product-37389/Ease-Audio-Converter-4-8 maxima math software [url=http://buyoem.co.uk/it/product-35520/Topaz-ReMask-3-2]what is recruitment software[/url] best movie script writing software
[url=http://buyoem.co.uk/category-11/System-Tools?page=3]System Tools - Software Store[/url] paragon software marvel comics
[url=http://buyoem.co.uk/it/product-37388/Ease-Audio-Converter-2-4][img]http://buyoem.co.uk/image/5.gif[/img][/url]

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...

It is Miuccia [url=http://www.furworld.ru/ ]меховая фабрика [/url] and Patrizio Bertelli who discover the secret of Prada and invent the very first black nylon Prada handbag on the globe which opens the successful and beneficial entrance of world renowned handbag brand. Prada Handbags is known for its high end. Every woman wants a Prada handbag which presents the fashion and the way of life. Prada store sells cheap Prada, including Prada purses and Prada handbags. [url=http://www.furworld.ru/ ]шубы из китая [/url] is a better way for you to select a bag of high quality and best designed. With the expansion of Prada, an increasing number of [url=http://www.furworld.ru/ ]мех [/url] are established. Buying Prada handbags and Prada wallets in [url=http://www.furworld.ru/ ]фабрика меха [/url] could save you quite a few cash and time. [url=http://www.furworld.ru/ ]меховые фабрики [/url] is the one other good choice for you. [url=http://www.furworld.ru/ ]шубу [/url] will not let you down.

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

Foysal said...

I think that your site will be admirable in the world .Because it is a stranded site.
Recently I have setup a site which is possible to movie download in a short time.
movie download

Intelliscence Software Development Company 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

Psophon Pro said...

I loved this post.I read your blog and you are all ways comming out with some grate stuff...i shared this on my facebook and my followers loved it keep up the good work :-) Freedom APK

Softwares Cafe said...


Nice Post...you are all ways comming out with some grate stuff fallout 4 nexus

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.