简体   繁体   中英

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. 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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