简体   繁体   English

报告-Visual Studio 2012

[英]REPORT -Visual Studio 2012

我刚开始报告。数据集患者是一个下拉列表。在这里我想添加一个NULL字段,所以如果我选择Null,它必须从数据库中检索一些值。如何在报告的下拉框中创建一个NULL字段,如下所示。但这对我不起作用http://msprojectnow.com/blog/reports-in-ssrs-with-multi-value-parameters-and-null-values

Assuming you are talking about a report parameter and that you intend to use Reporting Services Server to host the report. 假设您正在谈论报表参数,并且打算使用Reporting Services服务器托管报表。 I usually find the approach below works to give provide an empty value to pick. 我通常会发现以下方法可以提供空值供您选择。 So you add a dataset for the patient dropdown and use the query below as the data source for example. 因此,您为患者下拉列表添加了一个数据集,并使用以下查询作为数据源。

select 0 as PatientID, ''as Patient
Union
Select PatientID, Patient
Order By Patient

Then you select Query as you source for your Patient parameter pick this data source and choose patientID as the value and Patient as the display value. 然后,选择Query作为您的Patient参数的来源,选择此数据源,然后选择PatientID作为值,选择Patient作为显示值。 If you do the same for default value but just pick Patient id, the bank value will show as your initial selection when you run the report. 如果您对默认值执行相同操作,但只选择“患者ID”,则在运行报告时,银行价值将作为您的初始选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM