Pages

Wednesday, May 26, 2010

Cycling to work - a start!

This is somethng I had been contemplating for a quite sometime now but had been discouraged by well wishers as I had to commute almost 20km one way to work and with a laptop to carry it seemed impractical. Now with just about 5km to get to work I decided to give it a shot.

First thing was to get a bicycle so did a lot of googling and finally decided to visit the bicycle store and decide. Me being me it was quite likely that I would use the bicycle for a few days and then leave it to rust so decided to take it easy and bought a entry level 21 gear bicycle (Hero Octane). The reviews for this were not great but even then after sitting on it I thought it was comfortable. Bought the bicycle and it was pouring but decided to ride it back from commercial street. With the enthusiasm of a new bicycle managed to get him with a little bit of sweat. I did not stop pedalling which was quite funny as you will realise later in the post

Day 1: Left home nice and early and it seemed like hard work to get to office. I was sweating even though I wanted to take it easy. On the way back home climbing up the ramp on Gear 1 was easy but then later I saw some construction workers overtaking me with utmost ease with their old non-geared classic bikes - hmmm!!! Obviously, having paid quite a bit for 21 gears I was disappointed, got down and checked the air the convential style - by pressing the tyre with the thumb. That must be it. So, went back home, got myself a new footpump and filled in air.

Day 2: Much more easier I thought till I saw some construction workers in the evening who overtook me with ease! Went back home and tried rotating the front wheels. The disk brakes were holding them a little bit and the wheels wouldn't rotate with ease! Took an hour to finally align the disk brakes and get the wheels moving freely. Tried the back wheel and the brake pads where literally stuck to the wheels! One would have thought the guy @ the store would check all these things before delivering the bike. He takes 30 mins to check everything before delivering the bike!

Day 3: Definitely much easier this time. It was a breeze getting to the office and back. Hope to keep it going for sometime now.

Update: Its almost 6 months now and I have 2 bicycles - a Mongoose (MTB) and a RoadBike and good bikes make a difference. I have covered almost 1800kms including lot of century rides! It takes just 15 mins to reach office. That's almost 50% of what I took on day1 when I started cycling. I will probably blog on the long cycling trips separately and planning for TFN!

Pass Multivalue parameter to sub reports in SSRS

It has been quite a while since I have blogged. Obviously, cannot use that excuse that I was busy - probably not doing things which were not technical enough to be blogged.


Here I had a request from on of the teams that passing multi value parameters to the sub report is not possible and try to substantiate with this blog - http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/83d0c624-09a2-44c0-82ba-c2eb48571323. I was pretty sure this must be straight forward and hence checked this out and it may not be that simple.


The first step is to create the sub report and test it independent of the main report. Here ensure that the parameter has multi value enabled. All the other attributes of the parameter can be left to none since this will be a sub report and hence values will be sent from the main report. If you notice the parameter visibility has been set to visible. In theory, this is supposed to be internal but it keeps throwing up errors inconsistently when called from the main report if this is set to internal. Now, run this report and and ensure it works.

Now that we're done with the sub report lets work on the main report. Create the report and then add the sub report created as described above. Now, right click on the sub report within the report designer and choose sub report properties.


This should show up the dialogue shown below. Choose the parameters tab from the left menu. Add parameters and then choose the name of the parameter that you had created in the sub report. There seems to be a bug with SSRS that it does not show the name of the parameter in the drop down sometimes. Try saving the sub report and then click on the drop down. If this still does not work you can type the name of the parameter and then for the value choose the parameter that you had create in the main report
Now, the value from the parameter in the main report should get passed to the sub report. Another common mistake which should be avoided - in case you are using this multivalue parameter in the filters ensure you choose the 'IN' operate and not equal to operator.

Happy Reporting!