3 Replies Latest reply: Jan 25, 2013 6:05 AM by Paul RSS

    Presentation variable - populating one based on a calculation on another

    Robert Angel

      I have a presentation variable TYEAR - I populate it from a column prompt.

      I present it as a heading on various columns.

      So far, so good.

      I now want to use TYEAR to calculate PYEAR where PYEAR = TYEAR -1, this so I can use PYEAR also as column headings.

      I do not want the end user to see PYEAR if at all possible, nor do I want to use JScripts.

      Is this possible.

      I tried creating a second presentation variable, and using the default functionality to populate the year by referencing TYEAR in the where clause - this works, but only on first entry, the default does not change when TYEAR changes from its default...

      I also tried populating the presentation variable via a straight calculation @{TYEAR} -1 or cast(@{TYEAR} as integer) -1, but neither seemed to work.

      Anyone done this?