我在做關於SSRS報告的報告。我需要爲Textbox寫一個表達式來顯示不同的輸入參數(如果提供的話)。我曾試着寫下這個表達。但不能完美。在這裏我提供了示例代碼,其中我需要有一個SSRS表達式。任何人都可以幫助我以SSRS格式提供相同的表達。帶有If語句的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)
感謝
我看不到您設置TextBox值屬性。發佈你的代碼? – andrewb