Sorry for not posting any new OpsMgr posts lately, but I’m just too busy right now. Hopefully I’ve some more time in the future, because I’ve quite some things to blog about. But today I was creating a Custom OpsMgr Report in Microsoft Visual Studio for a customer and needed to have some Default Parameters for this Report.
This Report has only two parameters Report Year and Report Month, because this Report only needs to show data for a whole month. So if you want some Default Year and Month values for your Report Parameters you need to do this in Visual Studio:
You could use those Report Year and Month Parameters in your SQL query like this example:
Off course in your Report query you would not declare the @ReportYear and @ReportMonth variables but use the (Default) Parameter values ;-)
The result of using Default Parameters in a Report is 2009 as ReportYear Parameter and 5 as ReportMonth Parameter (I changed it manually to 6 because in May I did not any data ;-))