Search code examples
parameterspentahoreport-designer

Setting the "Default Value Formula" (Current Year/Month) - Pentaho


I have month and year parameters for my report which allows the users to select year and month and then execute the report. I would like to default to be the current month and current year when the report is first run by the user. What is the correct formula in the Default Value Formula field for current month and current year? I can't find a formula that will give me my desired results and it is not an option as shown in the picture to hard code the values "2014" and "January".

enter image description here


Solution

  • The answer is:

    For the year : "=YEAR(TODAY())"
    For month : "=MONTH(TODAY())"