2

I'm using SSRS 2008 and I have two reports (A and B). B has 4 parameters for which I have assigned a default value. Both reports work fine on its own

The problem is that I want to be able to call report B from report A and use the selected value to overwrite one of those parameters in report B.

So far what happens is that Report B appears when it's called from Report A but the parameter that should be overwritten remains blank and causes the data not to load at all, the. The other parameters show the default values but the 4th one remains blank.

I have tried:

  • taking off the default value and didn't work.
  • order: I also read a post here about the order of the parameters and I chose to leave the one that needs to be overwritten last in report B.
  • data types match among the parameter being overwritten and the value being sent from the parent report (string).
  • the omit parameter expression is set to false which enables the value to pass through to the drill-down report.

Any thoughts?

Community
  • 1
  • 1
Javi
  • 21
  • 3
  • 1
    How are you getting to report B from report A - through an action on a field in report A? If so, how have you set the action options? –  Mar 22 '12 at 07:40

1 Answers1

0

I've done this recently by setting a click action in a tablix control. Essentially, I went to the Text Box Properties I went to Action and then set the action as Go to URL. I've then put an expression in for the following (which you can modify to your needs depending on the destination report name and parameters):

=IIf(
    Parameters!p_hide_links.Value="y", 
    Nothing, 
    "javascript: void( window.open('http://' + window.location.host + '/ReportServer/Pages/ReportViewer.aspx?/Property+Management/" & replace(Parameters!i_this_report.Value, " ", "+") & 
    "&p_from_date=" & Parameters!p_from_date.Value &
    "&p_to_date=" & Parameters!p_to_date.Value &
    "&p_lease_exec=" & Fields!submitted_by.Value &
    "&p_building_state=" & Parameters!p_building_state.Value &
    "&p_division_id=" & Parameters!p_division_id.Value &
    "&p_building_id=" & Parameters!p_building_id.Value &
    "&p_view_type=d" &
    "') );"
)
Michael A
  • 9,480
  • 22
  • 70
  • 114
  • Note: If you're unsure how to adapt this please let me know your destination report name and parameters and I'll happily update the expression for you – Michael A Jun 04 '12 at 22:51