Archive for category Uncategorized

Dependent parameters in Reporting Services

Hold onto your butts (a little Samuel L. Jackson from Jurassic Park lingo) because this will be the best post I’ve ever done on a December 27th. Yes, it’s that great.

I was creating a report through SSRS that required the Yes/No parameters of one parameter, StabSelfInEyeball, to be dependent on another. Specifically, if parameter SonnyAndCher was Yes (and our Yes value had an ID of 1, No being 2), then the dependent parameter should only have No – the Yes would disappear completely. Because without Sonny, I just don’t want to hear Cher.

So I created a DataSet that binds to the StabSelfInEyeball parameter is  populated by this query:

SELECT 1 AS YesNoId
,’Yes’ AS YesNoType
WHERE @SonnyAndCher <> 1
UNION
SELECT 2 AS YesNoId
,’No’ AS YesNoType
ORDER BY YesNoType

The first Yes/No parameter, SonnyAndCher, is populated with a similar query, just without the WHERE clause:

SELECT 1 AS YesNoId
,’Yes’ AS YesNoType
UNION
SELECT 2 AS YesNoId
,’No’ AS YesNoType
ORDER BY YesNoType

So how this works is that since the second parameter, StabSelfInEyeball, is dependent on the first, SonnyAndCher , whenever SonnyAndCher is changed, StabSelfInEyeball is refreshed. So, if the user choose ‘No’ for the SonnyAndCher parameter, then I can choose to either stay myself in the eye or not, it’s up to me. But if SonnyAndCher is Yes, the only choice for the StabSelfInEyeball¬† parameter is “No”. I will not stab myself in the eye – why would I do that? It’s Sonny AND Cher – can’t beat that.

Advertisements

Leave a comment

Determine the number of users on your web site

It is the eternal question: How many users are connected to my IIS web site? A little poking, and I found that I could answer that question Performance Monitor.

First, click on the Add button (the “+” sign, highlighted in green). That will display the “Add Counters” window.

Performance Monitor

Performance Monitor

From the “Performance object” drop down list, select “Web Service”. This will change the list of counters on the list on the lower left. Select “Current Anonymous Users” and / or “Current NonAnonymous Users”, depending on what you want to track.
If you highlight the counter you wish to track. Look at the “Last” to see the latest count.

Performance Monitor

Performance Monitor

I’m certainly open to better ways of doing it, but it worked for me.

Leave a comment