Tuesday, October 23, 2012

Deploy a Web Service

I tried to deploy a web service that allows me to use TFS queries as data source on some of the reports. The benefit of using TFS queries vs. the data warehouse is that you don't have the delay of data update from the operational data store to the data warehouse. Anyway after getting the code snippet from this post and tweaked it a little bit. I'm ready to deploy it to a IIS server. I ran into an error that complains about the permission of to the global assembly cache. After some digging online the following post helped me fixing the issue, specifically step #5. Thanks Dan! Great job writing up the post! http://blog.hmobius.com/post/2006/06/30/Problems-with-IIS5-dotNet-v11-to-v2-migration-woes-part-5.aspx Thanks to Ewald as well for providing a great solution in SSRS.

Wednesday, June 8, 2011

Alternating Background Color by Groups

=IIF(RunningValue(Fields!Biz_Story_ID.Value,COUNTDISTINCT,NOTHING) MOD 2 = 0,"PaleGreen","White")

Monday, February 7, 2011

Be Careful When Apply Restrictions on Outer Joins

This query doesn't work as expected.
select

rd.System_Id as BizStoryID ,0 as TechStoryID ,0 as TaskID from


#UpdatedWorkItemRawData rdleft join #ItemHierarchyPrep ihon rd.System_Id = ih.BizStoryIDand rd.System_WorkItemType = 'eScrum Product Backlog Item'and rd.TeamProjectSK = @ProductBacklogProjectNodeSKwhere ih.BizStoryID is null

To get what I need, the following query is needed.
 

select rd.System_Id as BizStoryID ,0 as TechStoryID ,0 as TaskID from

#UpdatedWorkItemRawData rdleft join #ItemHierarchyPrep ihon rd.System_Id = ih.BizStoryIDwhere rd.System_WorkItemType = 'eScrum Product Backlog Item'
and rd.TeamProjectSK = @ProductBacklogProjectNodeSKand ih.BizStoryID is null

Wednesday, December 29, 2010

How to Pass Multi-Valued Parameter to SSRS Sub Reports

I'm working on a report that contains about 10 subreports. Some of the subreports need multi-valued parameter passed from the main report. After struggling with it for awhile I came across a good post that explains three different ways to do that. All three worked from me.
http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/ae5ac615-1076-428d-9fcf-6c27e5fee1f0/

Friday, December 3, 2010

Monday, November 15, 2010

SQL Server 2008 Email Notification Setup

I was trying to set up an email notification for a SQL Server agent job. I set up the Database Mail profile under Management, created operators under SQL server Agent, selected an operator under the notification section of a job. After the job is completed, guess what, there is no email. After diggin around I found this post(http://social.msdn.microsoft.com/Forums/en/sqltools/thread/839b5c27-9bc5-4467-a9d4-e78f9934a761). I tried restarting the agent serice and then realized that the mail profile was not enabled under SQL Server Agent Properties -> Alert System. After enabling that and restarting the agent service, it worked. The key here is to enable the mail profile first, then restart the agent service.

Monday, November 1, 2010

An Interesting Report Caching Issue

I was working on caching a report and encountered an issue. It simply didn’t work. All caching settings were tried. But it just doesn’t cache the damn report. I looked around on the Internet and no one seemed to have the same issue. One unique thing about this report is a big multi-valued parameter called Feature. The drop down has 150 – 200 entries depending on the selection of other parameters.

The next thing I did was looking into the [ExecutionLog2] view in the ReportServer database. I compared the parameters used in two different report runs. And I noticed that on the big list of features, one feature was converted to lower case (test feature) while the other report run has the same feature in regular cases (Test Feature). The data set that generates the feature list has the feature listed as Test Feature. And the lower case issue is on different feature everytime. I don’t know why SSRS converts it into all lower case. But because of that, it thinks these two report runs contain different parameter selections. Therefore it is not cached.

To fix that, I did a upper() on the query that generates the feature list and the query that generates the final report data. The report now takes a little longer to run. But the caching issue is fixed.

A good article I found when I troubleshoot the issue is at:
http://blogs.technet.com/b/rob/archive/2010/02/11/caching-ssrs-reports-for-performance.aspx