How to pass multiple values to drilldown report?

可紊 提交于 2019-12-11 16:22:13

问题


I m using sql 2008. I have one matrix on the report. Data will be as follow


                Maths   English  Science   
Gender            5        3        4
 Male             1        2        2
 Female           4        1        2

Count shows the number of students passed in respective subjects.Data is grouped by gender When user click on count it will be redirect to sub report. Now i want to pass Students Ids to sub report to show that students only. I have tried Join, Split but those functions can be used with parameters only. Not with Fields. Basically i want to pass string of comma separated students ids to sub report.

I have searched on Google but not finding any solution. So awaiting for solution.


回答1:


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" &
    "') );"
)



回答2:


This might be the answer you are looking for:

Right Click on any text box select TextBox Properties and do as in below jpg.

Now select the detail report from the drop down [create new if its not there]

pass the parameters whichever you wanted to and this will be like input parameter to this sub report and using any details dataset you can show on the report view.

Let me know if you face any problems in that.



来源:https://stackoverflow.com/questions/10881387/how-to-pass-multiple-values-to-drilldown-report

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!