我目前有一个药物名称参数,根据使用Store参数选择的商店,填充药物列表。下面的查询部分是我用于填充药物名称的数据集。
alter procedure SSRSReporting.Parameters_Get
@ParameterName varchar(100),
@StoreKey varchar(max) = NULL
as
declare
@ParameterNameLocal varchar(100),
@StoreKeyLocal varchar(max) = NULL
select
@ParameterNameLocal = @ParameterName,
@StoreKeyLocal = @StoreKey
else if @ParameterNameLocal = 'GPIName'
begin
declare
@StoreList table (StoreKey int)
insert into @StoreList (StoreKey)
select
convert(int,Name)
from
SSRSReporting.SplitString (@StoreKeyLocal)
select
'All GPIs' as 'Label',
null as 'Value',
0 as 'OrderBy'
union
select
DrugName as 'Label',
GPI as 'Value',
1 as 'OrderBy'
from
Final.FactRXBusinessEffectiveDay fact
inner join @StoreList sl
on fact.StoreKey = sl.StoreKey
inner join Final.DimDrug drug
on fact.DrugKey = drug.DrugKey and drug.DEAClass <> 'No DEA Class'
order by
'OrderBy',
'Label'
end
主数据集包含以下与药物名称相关的代码
declare @GPINameTable table
(
GPI varchar(max)
)
if @GPINameLocal IS NOT NULL
begin
--Multiselect GPIs
insert into @GPINameTable (GPI)
select
Name
from
SSRSReporting.SplitString (@GPINameLocal)
end
where
PharmTransDateKey between @StartDateLocal and @EndDateLocal
and (@GPINameLocal is null or drug.GPI in (select GPI from @GPINameTable))
我目前将药物名称的可用和默认值设置为填充药物名称列表的数据集。我还要提一下,Drug List参数需要多选。
问题是在我选择商店并填充列表后没有选择任何内容。我如何默认选择全部?