[英]Comments in SSRS Report Expressions
我在Reporting Services中使用了一些復雜的表達式來控制報表中數據的值,格式等(請參閱MSDN )。
是否可以在這些表達式中插入代碼注釋,如果是,那么語法是什么?
通過代碼注釋我的意思是:
// single line comment
/* or multi line comment */
它看起來像VB代碼。
嘗試使用撇號寫評論。
'This is a sample comment.
這是猜:)
編輯:VB實際上沒有多行注釋。
但是,請嘗試使用以下內容查看是否有效
'This is a sample comment _
followed by a new line _
and the comment ends
如果這不起作用,你可以這樣做
'This is a sample comment
'followed by a new line
'and the comment ends
編輯2:此外,似乎評論應該在最后。
如果你想評論一個switch語句,你可以這樣做:
=switch(
false, "--- First, test if above zero ---"
, Parameters!Test.Value > 0
, "Value is above zero. Yeah!"
, false, "--- Then test if -1 ---"
, Parameters!Test.Value = -1
, "I guess the value is unknown"
, false, "--- Finally catch everything else ---"
, true
, "We could not handle this value. Sorry :-\"
)
帶有false的行永遠不會被擊中,這樣你就可以將它們用作注釋。 不是很漂亮但很有用:-)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.