我正在报告 SSRS 报告。我需要为文本框编写一个表达式以显示不同的输入参数(如果提供)。我试过写表达式。但无法做到完美。在这里,我提供了示例代码,其中我需要一个 SSRS 表达式。任何人都可以帮助我以 SSRS 格式提供相同的表达式。
代码
If(Parameters!FromCreationdate.Value !=null && Parameters!ToCreationdate.Value !=null)
{
"Created Date:"+ Parameters!FromCreationdate.Value + "To Created Date:"+Parameters!ToCreationdate.Value;
}
else if(Parameters!FromCreationdate.Value !=null)
{
"Created Date:"+ Parameters!FromCreationdate.Value;
}
else if(Parameters!ToCreationdate.Value !=null)
{
"To Created Date:"+ Parameters!ToCreationdate.Value;
}
表达
=IIf(isnothing(Parameters!FromCreationdate.Value),"", "From Creation Date:"+Parameters!FromCreationdate.Value, iif(isnothing(Parameters!FromCreationdate.Value)),"", "To Creation Date:"+Parameters!FromCreationdate.Value)
谢谢