Wednesday, August 15, 2007

Open linked report in new window

Unfortunately, there's no simple way to open linked-report in new browser window. The work-around is to use the URL link, rather than report, however that has couple of issues. (a) you have to specify the location, which is a problem if you have dev/test/live environments (basically you have modify the report for each). (b) passing parameters is possible, but can be tricky in case you're passing complex texts.

Here is detailed solution.

In short:

Non-parameterized Solution
="javascript:void(window.open('http://servername
/ReportServer?%2freportFolder%2freportName&rs:Command=Render'))"



Parameterized Solution
="javascript:void(window.open('http://servername
/ReportServer?
%2freportFolder%2freportName&rs:Command=Render
&MyParam1=" & Fields!MyField.Value & "'))"

Couple things to know:

1) Notice that you have to use "http://server/
ReportServer" and NOT the "http://server/Reports" link!

2) In case your "reportFolder" and "reportName" contain spaces, either leave them there or replace them with "+" (e.g. "My Report" -> "My+Report").

3) Notice the "
&" in parametrized solution - it's safer to use than "+", because it will force string conversion on the parameter value.

4) There are more parameters you can use to modify the way the report is presented. Nice description is in this MSDN article.

Tuesday, August 14, 2007

TFS Evaluation - thoughts

I've spent last couple of days evaluating TFS along with the Team Suite version of studio. Luckily, as a trainer, i have access to the MOC 2631 course, so I was able to actually test the stuff rather than just reading about it.

Prior to this, i've evaluated SourceSafe 2005 as well as Perforce - needless to say, SS doesn't match PF by any means. PF intergrates with VS quite nicely - it may not be as smooth as TFS (especially when it comes to solutions/projects), but still good enough to keep developer happy.

For testing, i evaluated NUnit. TFS offers much more that that though (code-coverage tests, load tests, etc.).

Here are couple of my thoughts:
1) TFS server is running for about $2700 if i'm not mistaken. The real killer is VS Team Edition. If you combine that with "Visual Studio Team Suite with MSDN Premium", you're looking at almost $20,000! Ouch. Compare that to "Visual Studio Professional Edition with MSDN Professional" for $2000... It already includes license for SS! Perforce is kind of pricey as well - $750 per user.

2) What i really like about VS-TS is the integration of work-items with everything (code changes, artifacts, builds, etc.) User logs a bug, you fix it in "myobject.cs" and when you check-in the file, you just link it with the bug work-item. This really kicks a$$.

3) I haven't had a chance to do a research on UI tools for work-items though. I hope there's something that would allow regular users to add/view work-items - and I sure hope it won't require CAL for each user!

4) Documentation. We all hate it, avoid it, fake it... I've tested couple of the diagramming tools in VS-TS and I have to say i was pleasantly surprised. As an architect, I can quickly draw top-level diagram, drill down to application diagram, code-generate from that to give it to the developers. Nothing impressive yet - get this, it propagates changes in the lower-level diagrams back to the upper level ones! Still need to play with this in some real-life scenarios, but so far very impressive.

5) Policies. Oh developers are gonna hate me now - I can actually FORCE them to TEST before they submit changes back to repository.

6) SharePoint site - i'm still kind of undecided on this one. I like the idea of sharing documents in SP for each project, having them version-controlled, etc. I just don't like SP and then I'm worried about maintenance...

Final words - so far, I'm inclining towards the TFS. Yes, it's very expensive, but if you need to put process around your app development and actually have a tool that helps, i think this is the way to go. Can you do all the stuff without it? Certainly yes, but expect to pay for some of the tools (Perforce, etc.) and don't expect them to communicate as seamlessly as TFS...

This FAQ may have some questions for you as well, plus many TFS links...

Thursday, August 09, 2007

Windows Explorer has stopped working - Vista error

After about a month of being happy with Vista, i ran into this message. It all started by Vista not being able to restore from hibernation. Then, when it attempted to start normally, after log on two messages kept coming up with "Windows Eplorer has stopped working" and that Vista is restarting it... over and over... After skimming through web and basically not finding a resolution, this is what I did:

1) Restarted Vista in Safe Mode - didn't do any good - the error appeared even there.

2) Restarted Vista in Safe Mode with Command Prompt
- there i ran "MSCONFIG" and:
a) Disabled all non-microsoft services
b) Disabled all start-up programs
c) Disabled UAC (some posts on web suggested that it might be the cause of problems)

After restart, the issue was still present. So back to the Safe Mode with Command Prompt:
d) open the Event Viewer (you'll find it in the Tools tab) and check application log. In my case, there was an error that windows can't read the file "C:\Users\...\AppData\Local\Microsoft\Windows\Explorer\thumbcache_idx.db".
e) run command (from Tools again), and rename the file (using "move") or even delete it.

Restart and all good! Vista will then show dialog that you modified the start-up options and whether you want to take your changes back to "Normal" - do so, restart again and you sould be back in business...

Monday, July 23, 2007

Couple of BizTalk 2006 Resources

These are worth your attention:

1) BizTalk Server Documenter - generates CHM documentation on BT artifacts (orchestrations, etc.) You'll need the Microsoft's Help Compiler in order to user it as well. Notice that you may need to make modification to the config file - depends on where you have the hcc.exe located. Works like charm with BT 2006, you can choose assemblies or even orchestrations that you want to document. It generates pictorial description of orchestrations too. Extremely helpful!

2) BizTalk Server Pattern Wizard - this one can be a bit tricky to set up and use. After download, execute the "BTPatternsWizardSS\BizTalkPatternWizards\Debug\setup.exe" to install the wizards into your VS. Then start a new project, and find the templates under "Biztalk Projects/Pattern Templates". I also highly recommend reading the "BTPatternsWizardSS\WizardDocumentation.doc" - it contains links to detailed descriptions of the patterns. Finally, there are videos (370MB) available which describe the patterns on examples.

Thursday, July 19, 2007

SharepointServices - crawler error

You may receive "Access Denied" erros in EventLog (Application) from SharepointServices, that it can't crawl... something like "The start address cannot be crawled". Here you can find nice description why. And here is the fix.

Short story: Create a DWORD registry key at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Lsa named DisableLoopbackCheck and set the value to 1, for TRUE, to disable the loopback checking.

BizTalk 2006 - working with WebServices

To effectively call WebService (WS) from BizTalk (BT), you have perform couple of steps. I'm going to list one of the scenarios, where you call WS from orchestration and you need to pass parameters along as well. To make this work, do following:
1) Add WebRefernce to your BT project
2) In the orchestration, add new port and select existing port type (select appropriate WS port in the "Web Port Types" at the bottom. You can either specify now or later.
3) Add Send and Receive shapes to your orchestration
4) Add 2 messages to the orchestration (msgRequest, msgResponse). The message types are in "Web Message Types" - just select appropriate for your method call and request/response.
5) Connect the send/receive shapes with appropriate methods on the port.

This sounds simple enough, but now you have create the request and populate with parameters. This can get tricky, depending on whether you're using primitive types (int, string, etc.) for parameters or complex types. Here is excellent description.
I would only add that in case you work with primitive types and want to simply assign values from some other message, you need to make sure that the fields you want to use are distinguished (otherwise you'll not see them on the message when you "." it)!

Finally, when you deploy, you'll have to create physical port in BT (unless you used "specify now" option). You need to create Send Port, type "SOAP", Send/Receive pipelines are "PassThruTransmit". In the "Configure" section, put the ASMX link to the URL. Note that you can specify authentication there as well, which may be very handy if your WS doesn't allow anonymous access.

Should any errors occur, you'll find them in the Event Viewer - also check for suspended (dehydrated) orchestrations in the BT admin console.

Monday, February 26, 2007

BizTalk 2006 : SQL Receive Location

If you're not sure that your SQL Receive Location is running or not, check Event Viewer - any problems would be reported there.

You may run into issued with MSDTC - e.g. see an error in Event Viewer saying the the MSDTC on the host computer is not running. Restarting the MSDTC is usually the trick (go to Component Services > Computers > My Computer > right-click and Stop/Start MS DTC)