本文介绍了级联参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经研究了执行此操作的各种方法,但似乎无法正确实施.

I have looked at various ways of doing this but cant seem to implement it correctly.

我在 SSRS 中有一个 3 参数报告

I have a 3 parameter report in SSRS

@县@当地政府@病房

我希望这些参数级联.So when @county is chosen @LocalAuthority only displays local authorities within that county.当地方当局只出现这些当局的病房时.

I want these parameters cascading. So when @county is chosen @LocalAuthority only displays local authorities within that county. And when local authorities are chosen only the wards in those authorities appear.

县到地方当局正在运作,但地方当局到沃德没有.正确的病房显示在下拉参数中,但在实际报告中并未按病房过滤.

the County to Local Authority is working but Local Authority to Ward isn't. The correct wards are showing in the drop down parameter but they are not filtering by ward in the actual report.

我正在使用存储过程.这是我的主要数据集

I am using stored procedures.This is my main dataset

  @County varchar (5),
  @LocalAuthority varchar (max),
  @Ward varchar (max)

   SELECT

             [DateTimeOfCall] 
            ,HourOfDay 
        ,[ConcatAddress] 
        ,[LocalAuthority]
        ,[Ward] 
        ,[County] 
        ,[PropertyType]

FROM table1

WHERE   [County] = @County AND [LocalAuthority] = @LocalAuthority and 

[Ward] in @Ward

地方当局的第二个数据集

2nd dataset for local authority

    @County varchar (5)       

         SELECT DISTINCT

                LocalAuthority,
        county              

              FROM table1

  WHERE [County] = @County

和 Ward 的最终数据集

and a final dataset for Ward

         @LocalAuthority (max)

        SELECT DISTINCT


        Ward,
        LocalAuthority 


              FROM table1

       WHERE [LocalAuthority] = @LocalAuthority

非常感谢

推荐答案

如果你想通过存储过程获取数据集,试试这个而不是 @ward 中的 ward:

Try this instead of ward in @ward if you wanted to get the dataset via stored procedure:

CHARINDEX(','+ward+',', ','+@ward+',') > 0

这篇关于级联参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 15:05