| expression | sample output value |
|---|---|
| Today() | Mar 7, 2011 |
| today() | Mar 7, 2011 |
| TODAY() | Mar 7, 2011 |
| AsOfDate() | Mar 7, 2011 |
| AsOfTime() | 3:51:36 PM |
| Now() | 3:51:36 PM |
| ParamNames() | |
| Locale() | en-us |
| ModelPath() | CAMID("Series 7:u:authid=636875232")/folder[@name='My Folders']/folder[@name='xmlsource']/package[@name='XmlPackage1']/model[@name='2011-01-23T04:02:43.459Z'] |
| PageName() | Page1 |
| PageNumber() | 1 |
| ReportID() | w2lldsyC49q8yGdqMjCddwysh4sdhCh844M2hyGw |
| ReportName() | expression_editor |
| ReportDescription() | test report expression |
| ReportOutput() | HTML |
| ReportAuthLocale() | en-us |
| ReportCreateDate() | Mar 7, 2011 4:00:57 PM |
| ReportDate() | Mar 7, 2011 4:01:32 PM |
| ReportLocale() | en-us |
| ReportOption('prompt') | 1 |
| URLEncode('a=b') | a%3db |
| String Functions | |
| character_length('hello') | 5 |
| 'hello' contains 'he' | 1 |
| 'hello' starts with 'he' | 1 |
| 'hello' ends with 'llo' | 1 |
| 'hello' like 'he%o' | 1 |
| 'hello' like '_ello' | 1 |
| position('he', 'hello') | 1 |
| position('hew', 'hello') | 0 - not found |
| substring('hello', 1,3) | hel |
| substring('hello', 2, -1) | ello |
| lower('Hello') | hello |
| upper('Hello') | HELLO |
| trim('both', ' ', ' H ello ') | H ello |
| Flow Control | |
| if (character_length('hello') >=5) then 'long word' else 'short word' | long word |
| case (3) when 1 then 'case 1' when 2 then 'case 2' when 3 then 'case 3' else 'other case' end | case 3 |
| case when character_length('hello') >3 then 'character_length' when position('hello', 'he') =1 then 'position' else 'other' end | character_length |