Monday, February 8, 2010

Pass Parameters via URL

I had to do some research to find out why my URLs did work. In short, the URL should point to http://localhost/ReportServer/ instead of http://localhost/Reports/, which is the Report Manager. Here is the post that helped:
http://dobrzanski.net/2008/08/11/reporting-services-problem-with-passing-parameters-directly-in-the-url/

Here is another good post about passing multivalued parameters:
http://bobp1339.blogspot.com/2007/10/passing-ssrs-report-parameters-in-url.html

Monday, February 1, 2010

Execution Policy Issue When Running a PowerShell Script from Team Build

I was trying to run a Powershell script as a step in a Team Build. To do that, I created the Powershell script, and called it in Team Build via an EXEC task. The execution policy was set to Unrestricted on the build server manully. I kept running into the permission error when the build ran ("cannot be loaded because the execution of scripts is disabled on this system. ").

After strugging with it for two days, I decided to put the set-executionpolicy in the Team Build to set the execution policy on the fly. And that fixed the problem.

Why did that work? After some digging (basically adding another powershell command to find out what the current user is.), the Team Build uses the same service account as the one we remote desktop in and set the policy manually. So the only theory that can explain that is the same account has different security settings in team build and remote desktop in. I still need to prove that.