Saturday, March 13, 2010

Monday, November 9, 2009

font, font and more font!!

Last few days have been very interesting.  Never had so much of font related discussion in my life.  These damn fonts are huge and my brain is too small not to give any crap anymore.. Hence the dilemma..

On the brighter side of this whole thing, learnt shit load of crap in a very short time.  These things are devious but fun.  Will post more once I have sorted this whole thingie out in-house...

need beer..

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

Sunday, June 28, 2009

Japan trip: Day 2

29th June:

We are taking it real easy today.. Catching up on sleep. Relaxing.. Wifey and Aiden are taking a nap.. they need it big time.. Hopefully, Aiden can adjust pretty soon to 12 hour flip and get back to sleeping at night instead of day.

Mom went to work. She cooked some "karaage"(fried chicken) last night and they are the best I have ever eaten. She will be making those again tonight... yoo hoo :)

I am, as usual, typing these few lines with a can of Asahi Super Dry. You should try this beer.. It is pretty good.

Weather is good. little but muggy, with rain. Not too hot yet.

It is 12:15 PM in Osaka.

Japan trip: Day 1

Will try to keep up with all the happenings on this trip.. but here is day 1.

We left Dublin, as planned, around 1:30 in the morning to catch our first of three flights on our trip to Osaka. This one was from Detroit to Salt Lake City at 8:00 in the morning on 27th June, Saturday. I figured it would take 3 hrs to drive, give 2-3 hrs at the airport and we will be rolling....Everything was going as planned and then.. Murphy's law decided to butt in. 50 miles into the ride and after 30 minutes of accident related hold up, (somebody decided to take his automobile straight into the one of those ditches along side US 23 in Delaware at 2:00 in the morning.. alcohol?? maybe..:)) we realized that Aiden forgot to carry his passport..(blame it on daddy.. of course). 5 minutes later (after being able to find a legit U-turn on US 23, that is.. they need more U turns..) we were driving back home!!. 45 minutes later, we started again..from scratch. We made sure we had all the passport this time.. :). I decided to take a different route as US 23 was jinxed that night. Rest of the drive went smooth..

Reached Detroit airport around 7 AM and it was a huge cluster@uck. Had an hour and half before the flight took off. We were flying NorthWest/Delta. 5 mins after talking to a ticket agent from Northwest, we were hauling ourselves and the luggage to the Delta counter. I thought they bought each other. :). There were around 50 people in line with only 3 of their agents working...what is up with that?. However, after pleading to couple of people and the Delta staff, we moved from way far behind in the line to way up front in the line and finally got to an agent with an hour left for the flight.
And then, the whole mess started. This delta agent took 40 mins to get us the pass..and this was a gate pass not a boarding pass. All she said after she was done with us was "RUN" which meant "Run like bitches" and so we did, with Aiden in the stroller. People were kind enough to let us skip our turn and go straight through the security. Having a cute little smiling kid helps. :) After we were done with teh security Kaori ran for the gate, with me behind her doing the sprint with Aiden in the stroller. 5 minutes before the departure, we were at the gate and.... they let us in. That was a very good feeling after a long time.

Detroit to Salt Lake city took us 4 hrs. Flight was smooth. Tried one wheat beer from Wisconsin and it sucked royally.

Next flight: Tokyo. 12 hours. This flight was not full, so I was able to "capture" one of those rows with 4 seats together. All excited and pumped up!. We were on board, ready to rumble and then the captain says, "We are going back to the gate".. They forgot to clean the toilets :) ...blimey!!. This time I was not pissed. 12 hrs without clean toilet is not good for health at all. Later they found out that there was some issue with one of the engines. An hour and half later, we were in the air. Flight was great. Aiden slept through most of it. Wifey and I managed some sleep here and there. Watched few good movies. Madagascar 2 was one of them. Had a few Heineken and Asahi and the buzz was awesome. We landed in Tokyo only half hour late. Now, I hate speeding, but this pilot dude was able to make up an hour that we lost when we started. He must be speeding over 20 miles/hr for sure. No speeding ticket here :)

In Japan, unlike USA, the immigration and custom checks are done at your final destination and not the port of entry. You do have to go through security if you are making a connection, which for us was to Osaka. Like I said before, having a cute little happy kid in a stroller helps. They moved us straight to a "special" line and we were done with security in 5 minutes.

Tokyo to Osaka flight time is an hour. We were first to board and as expected, I/We were flagged at the gate. So I went trough the whole "check up" routine again. It is interesting to note here that if you are being frisked, they will go through all the bags that you are carrying. At that time, you cant hand over your bags to wifey. They will only check whatever is on you. Kaori and Aiden just stood there smiling.
Later, I learned that one adult in the family needs to go through this routine, which I still doubt is the case. It has something to do with raji for sure. So, we are ready for our final flight, taxiing for take off and then the pilot goes again..same routine.. we are back at the gate.. This time, they forgot to put few of those people's luggage on the darn plane :) An hour later we were in the air.

By the time we got out of immigration, diaper change at the airport(Aiden decided to do his due diligence in the flight from Tokyo and we ignored it:) It didn't stink that bad..) and immigration it was 10 PM, next day(28th June), in the night.
Kaori's sister (Yuko) and her family were there to pick us up. It felt so good to see them after 4 years. Both the kids have grown up big time. Beautiful, tall and talkative! ( Haruka, 7 yrs and Riku, 9 yrs). Last time I saw them, they were so tiny. They were all over Aiden and he for sure enjoyed all the attention.

And then, I smoked one Marlboro lights. It felt soooo gooood..

By the time we reached mom's (Takawashi), it was 11:30 PM. Stopped by in Fujidera city to get some beer and shochu. All of us hung out at home for another hour. We realized that all of a sudden, we were not tired at all. Aiden was doing his thing.. walking and talking. We were excited enough to give them all the gifts last night instead of waiting for another day. Ate good food and indulged in beer and shochu. I got a very beautiful pair of sandals from Yuko. It has a very aesthetic look to it. Yuko and family left shortly afterwards. .

felt great... its always so good to see all the family. Loved it.

Will post some pictures too. Haven't had time to go crazy on my camera yet..

More later..

Wednesday, February 4, 2009

Thank you, Tim Moffatt

Tim Moffatt, President of Data Dynamics, passed away yesterday after a long battle with cancer.

I spent plenty of days getting drunk with him and the crew at "Whiskey Dicks", "Cheers Too", talking all kind of good stuff and some real insane trash. He never lost his sense of humor. He used to go nuts on me a lot and it was all so cool. :). Never ran out of crazy things to freak people out.

Thanks for those 6 good yrs.

Rest in peace, my friend.

Thursday, July 10, 2008

daddy time..

Here is PapaRaji with Aiden.