Search code examples
dictionaryreporting-servicesreport

Report Builder MAP Parameters


Good Afternoon, So I have built a State Map in Report builder that is separated into Counties. I have been pretty successful, however there is one thing I cannot figure out. When I click on the county, is it possible to pass the county name that I clicked to a chart on the same report. I can pass it to another report via go to report, but I would like to have it on the same document.I also kept getting a Subreport not found when I attempted that method. Any help is greatly appreciated.

Thanks!


Solution

  • A basic rule of SSRS is that with very few exceptions, you cannot change the content of a report unless you refresh the report.

    Bearing this in mind, you have a couple of options..

    Call the same report again as a subreport.

    Assuming you only want your map and a single dynamic chart.

    • Add a parameter to the report that defaults to specific value such as 'none'. Then you can decide what do show in your chart when the parameter = 'none' or you could choose the hide the chart if the parameter is 'none'.
    • In your map go to the map's polygon properties and assign an action.
    • Set the action to be Go to Report
    • Choose your report (so we get the report to call itself)
    • Add a parameter, choose the parameter you added a few steps earlier as the name and select the field that contains the state name or ID etc as the value.
    • Your Chart's dataset can then be updated to use the new parameter in the dataset query.

    Create a chart for every State

    The other option is to create a chart for every state, you can do this using a table or list control and a subreport containing your chart, so you design will not have to have lots of charts individually placed. Each Chart can have a bookmark set (most objects have a bookmark property) that is the name or ID of the state it represents. Then in your map, set the action properties in the polygon properties to 'Go to bookmark' and then use the state name or ID as the bookmark expression to go to.