Reporting Services:具有多值参数的数据驱动订阅无数据输出 [英] Reporting Services: No data output by data driven subscription with multi-value parameter
问题描述
嗨社区,
我创建了一个报告,通过数据驱动以MHTML呈现格式向收件人发送电子邮件订阅。
我从MS动态读取的参数值SQL数据库。
一个名为App'的参数被定义作为多重价值。它存储在SQL DB中的值用分号(Value1; Value2; Value3)分隔。
如果我通过多值复选框手动启动报告和选项,它对我有用,报告就会执行。
使用多值参数的数据驱动订阅也会生成带有链接的电子邮件。如果我单击链接,报表将在报表服务器上执行,但这仅在多
值参数仅包含一个元素(例如Value2)时才有效。
但如果电子邮件中的链接包含更多内容,则无法使用比一个元素(例如Value1; Value2; Value3)。通过单击链接生成报告,但没有任何输出数据。
多值参数的字段显示为空白字段。
这是我的SQL查询:
SELECT Country,App
FROM ViewReport
WHERE Country = @Country
AND App IN(@App)
在报告中我尝试了以下解决方案,但没有成功:
在数据集/ DATA-Properties / Parameters中:
而不是=参数!App.Value - >  = JOIN(参数!App.Value,";")
或
而不是=参数!App.Value - >  = SPLIT(JOIN(参数!App.Value,";")," ;;")
提前致谢,
Adam
嗨Adam,
由于您的设计单值参数可以正常工作,我认为问题在于将多值参数传递给sql查询。
我们可以尝试以下两个步骤:
1。在数据集属性 - 参数。
设置而不是=参数!App.Value - >  = JOIN(参数!App.Value,";")
2.然后,在SQL查询中,更改
Hi community,
I created a report which sends an email to recipients in MHTML rendering format by data driven subscription.
The parameter values I read dynamically from an MS SQL database.
One parameter called ‚App‘ is defined as multi value. Its values stored in SQL DB are separated with semicolon (Value1;Value2;Value3).
If I start the report and options manually by multi value check boxes it works for me and the report is executed.
Also a data driven subscription with a multi value parameter generates an email with a link. If I click on the link the report is executed on report server, but this is only working if the multi value parameter contains only one element (for example Value2).
But is not possible if the link in the email contains more than one element (for example Value1; Value2;Value3). The report is generated by clicking on the link, but without any output data.
The field for multi value parameter is displayed as blank field.
This is my SQL query:
SELECT Country, App
FROM ViewReport
WHERE Country = @Country
AND App IN (@App)
In report I tried the following resolution, but without success:
In Dataset / DATA-Properties / Parameters:
instead of =Parameters!App.Value --> =JOIN(Parameters!App.Value,";")
or
instead of =Parameters!App.Value --> =SPLIT(JOIN(Parameters!App.Value,";"),";")
Thanks in advance,
Adam
解决方案Hi Adam,
Since with your design single valued parameter can work properly, I assume the issue was with passing multi-valued parameter to sql query.
We could try these two steps:
1. In Dataset Properties- Parameter.
Set instead of =Parameters!App.Value --> =JOIN(Parameters!App.Value,";")
2. Then, in your SQL Query, change
这篇关于Reporting Services:具有多值参数的数据驱动订阅无数据输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文