@MSGFORMAT
會採用一組物件,設定這些物件格式,然後將格式化的字串插入適當位置的模式中。(請參閱有關 "java.text.MessageFormat" 的 JAVA 文件。)
DTP 類型:
@MSGFORMAT
必須是字串。
語法:
@MSGFORMAT(text,param1,param2,param3,param4)
參數:
參數 | 描述 |
---|---|
text |
設計時期提示字串 |
param1 |
設計時期提示 |
param2 |
設計時期提示 |
param3 |
設計時期提示 |
param4 |
設計時期提示 |
範例:
[MSFG4]=@MSGFORMAT([String4],[FirsName],[LastName],[Month],[Year])
其中:
[MSFG4]
是非勾選提示之字串 的 DTP。
[String4]
是可提示的 DTP 字串。
[FirstName]
是可提示的 DTP 字串。
[LastName]
是可提示的 DTP 字串。
[Month]
是可提示的 DTP 成員,包含為維度選取的 "Period"。
[Year]
是可提示的 DTP 成員,包含為維度選取的 "Year"
假設下列值為輸入:
[String4]
: "{0} {1} completed this task in {2} {3}"
[FirstName]
: "Joe"
[LastName]
: "Smith "
[Month]
: "Feb"
[Year]
: "FY15"
在此範例中,[MSFG4]
會傳回 "Joe Smith completed this task in Feb "FY15"。