• tuktukg (6/5/2015)


    gotcha.....but how do i set the parameter to be the correct agentname on that row then pass it to the agent report?

    T

    Perhaps I'm missing your question and don't have SSRS handy to provide an example but it should be pretty simple.

    Say your report is returning a column that has the field value [agentname]. You click on that field and set the action to "Open new report". Then, while still in the Action window, you point to a report that accepts a parameter called @agentname. You then set the Action to go to that report. In the Action window you click "Add Parameter". You set the name @agentname and, for the value, you add [agentname] (the square brackets represent the name of a field).

    If a user runs that report they'll see the names, "Sally Smith", "John Brown", "Jerry Jones"... When they click the row containing "Sally Smith" it will pass that as the value of @agentname to your other report.

    hmmmmm.... perhaps this is what you are trying to figure out....

    Because there can be more than one agent with the same name you may want to pass a unique identifier, say AgentID (oor whatever your primary key is named) but you don't want it to appear in the report as a column. You could include AgentID as a column but make the column hidden. The user wont see it but it's still included and is available to add as a field for the value of your parameter. Then when the user selects "Sally Smith" it will pass the @AgentID for her. In this case you would have to have your sub report accept @AgentID and build your logic around that.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001