Partager via


ConfigMgr 2012: Passing parameters to reports like the good old days

ConfigMgr 2012 uses SQL Server Reporting Services as its reporting engine and this is great because it really improves the control and extensibility you have over your reports, but it can be a little daunting for newcomers to the product. 

So a quick one from me today covering a very common reporting question I get from customers – “how do we pass parameters to reports like we used to in SMS/SCCM 2007 ASP reporting?” A typical scenario for doing this is that customers want to link ConfigMgr reports with other BAU reporting tools to give end users the complete environment picture.

An easy and recent example I had of this was a customer who wanted to recreate the link in their asset portal, so when a member of staff clicked the computer name they were taken to a page that listed installed software on that machine.

  1. Identify the report you want to pass parameters to on the fly
     

  2. Get a list of parameters used by this report. There are two ways to do this;

    1. Using the reporting portal locate the report you are looking for, in our case Software registered in Add Remove Programs on a specific computer, open the drop down menu and select Manage from the list of options


      Select the Parameters tab on the left hand menu and inspect the parameters available to use with this report. Remember to note down the parameter name and not the display text. 

       

    2. Using report builder open the report you are interested in and expand parameters from the left. The nice thing about doing this is you can actually look at where the report is pulling the particular parameter from


       

  3. Finally now you have the parameter name, use the ReportServer link to the report and tag the parameter and value on the end to instantly build the report on the fly.

    In my case the report server URL for the report is: https://sp1rtm/ReportServer/Pages/ReportViewer.aspx?%2fConfigMgr_PR1%2fSoftware+-+Companies+and+Products%2fSoftware+registered+in+Add+Remove+Programs+on+a+specific+computer&rs:Command=Render

    With my parameter appended and an example value, it looks something like this: https://sp1rtm/ReportServer/Pages/ReportViewer.aspx?%2fConfigMgr_PR1%2fSoftware+-+Companies+and+Products%2fSoftware+registered+in+Add+Remove+Programs+on+a+specific+computer&rs:Command=Render&computername=SP1RTM

    Opening the above link automatically opens the report with the data for the device I was looking at.

    Meaning all my customer had to do was automatically add the computername variable to the end of the report URL and they could make sure of the SCCM reporting engine.

Comments

  • Anonymous
    November 01, 2013
    What to do with spaces in the parameters? It would be nice with an easier method, like a button to create a link or something..   /Jens

  • Anonymous
    February 03, 2015
    Quote - "this is great because it really improves the control and extensibility you have over your reports"

    No it doesn't. SCCM 2012 reporting is a complete POS.

  • Anonymous
    April 13, 2017
    doesn't wrok fro me

  • Anonymous
    April 13, 2017
    I'm using Current Branch. Unsure why it's not working. Just a prompted collection reporthttp://server/Reports_SCCM/Pages/Report.aspx?ItemPath=%2fConfigMgr_XXX%2f_Custom%2fProColReturnsMostPCandUser_ExcludesManagerinfot&rs:Command=Render&CollID=XXX00026See any reason for it not to work