Thursday, August 27, 2009

Report Parameter Default Values

While developing SSRS reports I almost always define default report parameters in case I need to fix some issue with layout or data itself. It saves some time as I don't have to fill report parameters each time I want to preview report with new changes applied.
But after report is deployed to production report server and users start using it default parameters are not that handy there. Especially with heavy statistics reports (that takes more than several seconds to process request) when report engine starts processing request at once using default parameters. Almost in all cases default parameters does not match user's. Nobody wants to wait extra before submitting desired input parameters especially when "extra" is several minutes long.


So don't forget to empty default parameters prior to deploying report or if deployed empty them and redeploy.


PS: And don't forget to update report subscriptions as well in case you have some.


Regards,
Oleh

Sunday, August 23, 2009

Alternating background colors for odd and even tablix rows

In this blog post I will describe how you can add alternating background colors to SSRS tablix odd and even rows.
What do you need to know is that expression evaluation rules in RS 2008 have changed as a result of the new on-demand processing model. As a result, state in class-level instance variables is discarded as you page through the report which makes maintaining state trickier between page requests. However, RS 2008 introduces report variables that guarantee one-time evaluation semantics.

How we can reuse it to accomplish our goal:

  • Create a function that will update _evenRow flag state each time it's called.
Open report properties box -> Code tab -> Add next code:

Public _evenRow As Boolean

Public Function EvenRow() As Boolean
 _evenRow = Not _evenRow
return _evenRow
End Function

  • Create a variable within Row group and set the expression to call EvenRow function. Since it will be evaluated one time per each row it's what we need.

  • Set row background color depending on variable state.
=iif(Variables!EvenRow.Value, "LightGrey", "Transparent")

  • and finally the outcome



Regards,
Oleh

Sunday, August 16, 2009

What's new in WCF 4.0, WF 4.0

A Developer’s Introduction to Windows Communication Foundation (WCF) .NET 4 Beta 1 describing upcoming WCF 4.0 changes has been published on MSDN. The basic idea is to simplify developer experience and provide more integration with WF 4.0. Introduction to WF 4.0 changes could be found here.


Enjoy!
Regards,
Oleh

Saturday, August 15, 2009

Sysinternals Suite updated

Sysinternals Suite has been refreshed with latest releases and new utilities.

"The Sysinternals Troubleshooting Utilities have been rolled up into a single Suite of tools. This file contains the individual troubleshooting tools and help files. It does not contain non-troubleshooting tools like the BSOD Screen Saver or NotMyFault."

Latest version could be downloaded here.

Enjoy!
Oleh