Creating a SubReport in SQL Server Reporting Services

I am documenting this here because this is very difficult to find anywhere online.

When you are creating a report in Visual Studio, one of the options you have is to create a subreport. I tried to make one a year ago and gave up after failing to get it to run correctly. This time around though, I finally figured out what I was missing.

Here is what you need to do:
* create your report and subreport as you normally would.
* Add parameters to the subreport and make sure to pass those same parameters in the subreport control on the “master” report.
* Here is where I had problems. On your .aspx page add OnSubreportProcessing="ReportViewer1_SubreportProcessing" to <LocalReport>
* Then in your .aspx.cs file add the following method:

protected void ReportViewer1_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
 {
 report_vw_ActionLogTableAdapter actionTA = new report_vw_ActionLogTableAdapter();
 DataSet ds = new DataSet();
 ds.Tables.Add(actionTA.GetActionLogDataByServiceRequestID(e.Parameters["ServiceRequestID"].Values[0]));
 ReportDataSource dataSource = new ReportDataSource("CustomerService_ActionLog", ds.Tables[0]);
 e.DataSources.Add(dataSource);
 }

Replace __CustomerService_ActionLog__ and __actionTA.GetActionLogDataByServiceRequestID__ with your appropriate values.
There you have it!

Comments? Feedback? Leave a comment!

Is it a Podcast or Something Else?

I have been thinking about this and have some thoughts on the whole thing.

The internet started out with most people not knowing or understanding it. Today they can’t live without it. Blogging was something that was around before 1998 (when I started blogging), back then no body knew about it or could understand why you would put your journal online. Around 2005 (or so), a blog network was sold to AOL for multi-millions and many are making a living from it now.

Now we have podcasting. We are in the exact same position now we were then. The one problem? The community is divided. We have the Twit’s calling it netcasts, we have Podshow (ahem, Mevio) getting rid of the podcast. Then we have companies like RawVoice and FarPoint Media (and many others) that are sticking to podcasts (at least at this time).

I think the problem is “What is a podcast?” Is it the show itself (wither it is video, audio, or other files)? Is it the style it is created in (independently produced by non-professionals)? Or is it the delivery mechanism? Once people finally agree on that (and I don’t think they will at this point), it can grow more easily with the united message.

I think podcasting is the delivery mechanism. My primary intended distribution is via subscribers in a podcatcher. They have other options like downloading and “streaming” from the website, but the intention is to have them receive it automatically. Thus my show is delivered via podcast. I consider networks like Mevio and FarPoint (BluBrry is not a network… yet) to be compared to companies like ABC, CBS, or Fox. Those networks provide the delivery mechanism (bandwidth) to distribute out to the people. They help out the the marketing and the other aspects that the production company doesn’t have as much experience with. Now BluBrry is not a network. Why? They provide to the production companies the tools they need to operate the company and treat it like a network of it’s own. BluBrry gets advertising and the tools you need to market and support your show.

I feel that BluBrry, FarPoint, and a few others are doing this right in this rapidly changing technology. Treat it as a boot-strap organization and quickly change to adapt to the changing technology trends. While it is true that they don’t have the money to easily to this, these networks find new and creative ways to adapt and to bring new perspectives as a whole to the industry. I really don’t know what to think of Podshow. They are a media network, but I think they dived in head-first instead of walking in from the shallow end first to make sure the water was okay to swim in.

Bringing this back to me.. am I a podcaster? Yes! Am I a blogger? Sort of. Am I a developer? Yes. What will be on my business card? Independent Media Creator. The sales pitch? “My show features some of the best independent music from around the world along with music news, some humor, and the occasional rant. It is delivered via podcast or you can stream it off the website.”

This is just my opinion which is subject to change. Unlike the politicians, I am willing to accept I am wrong and reserve the right to change what I think based on feedback. Hopefully it all makes sense. I know my brain doesn’t put thoughts to words the best sometimes.

My Thoughts On: Gay Marriage

I have been meaning to write this for quite a while. I haven’t had much time (or rather taken the time time) to write this. I feel I have some interesting thoughts, so please read this article in full before making any comments. I will not moderate any of the comments left on this post unless I feel they are hateful or otherwise illegal. Now, read on to hear my thoughts. I may update this as needed to clarify my views. This topic has been very heated and I feel it is time for me to put my two cents in. First, I feel I should qualify myself. I am not gay, I am a Lutheran, and I believe that being gay is sinful and wrong. However, I also believe it is not my place to tell you how to live your life. I do know some gay people and one of them has been my best friend since high school. I will not judge you and your decision to do this. I don’t know or understand how one “becomes gay”, but I know this is something that I will have to live with. I am also an objective person. I feel I am able to weigh in both sides of the story and then with my Christian background I can make a decision based on my beliefs and my common sense.

I suppose now you are thinking this is a completely anti-gay post and you have already decided to stop reading. Well don’t! This isn’t one of those posts. In fact I believe the complete opposite when it comes to gay rights. I think gays should have rights that are equivalent to marriage. I do believe the word “marriage” should apply to the sacred union of one man and one woman in Holy Matrimony. However, in the light of all the discrimination in America towards gay people, I think a gay couple should be able to get the full rights a “normal” married couple would receive. They should be able to go on a joint health care plan through their employer and be able to adopt kids if they want. They should be allowed to make medical decisions for their partner much like a husband can his wife and vise versa. I feel it is wrong to ban gay marriage at any level of government. All the states are doing is breaking the laws that are already in place (in my opinion). They are discriminating against a group of people and say that these certain people don’t have the same rights as everyone else just because they like people of the same gender (hmm… this sounds much like another ugly event in our history). What would I call this union? I don’t know and I don’t care, just don’t call it “marriage”. Based on the thoughts of my friend, I am going to clarify something here. In the eyes of the government, marriage is a contract that grants you legal rights. Perhaps instead of giving it a different name, change what they call it all together. After all, marriage some thing that comes from religion. Perhaps just call it a “contract of a union of a couple”.

I have heard that Minnesota is working on banning gay marriage. Why don’t they lead the pack and come up with something a bit different? Do you know who are making these laws? Christians. I would say most of the members of congress are Christian. So these people who have to operate in the separation of church and state are following the church and creating these laws banning the union. I can’t wait until someone takes this to the Supreme Court. This is blatantly against what America stands for. It is amazing how much people are hypocrites. They say African Americans need equal rights, Latinos need equal rights, race x needs equal rights, but gays? They can’t get married. What does that really about Americans today?

I don’t really know how I can help, but I would if I could. Maybe just by writing this I have helped more than I think. If you like my views please pass this on to others. Heck, pass this on to your state representatives. Get the word out. We need to stop the banning of gay marriage and have our lawmakers make better use of their time getting the budget balanced.