2 Replies Latest reply on Dec 2, 2012 8:38 AM by trent

    Unable to use a format mask on hidden items?

      Version 4.1.1

      Hi There,

      For regular reports, we can open any column and update the format mask espcially for numbers without any problems. Now, I also have a HTML region where I am showing the value of a hidden page item using &P1_ITEM. I now wanted to format the item, Its a number field. So I opened the hidden item and entered the format mask, however, it does not seem to work.

      Any ideas or suggestions please?

        • 1. Re: Unable to use a format mask on hidden items?
          Hi Ryan,

          The format mask is applicable only to items of source type Database Column. If P1_ITEM is not a database column, you might need to go for some other approach (javascript etc). Or, have another hidden item that formats the value of P1_ITEM to the required format mask as:
          select to_char(:P1_ITEM, 'your-format-mask') from dual

          You can then use the second hidden item as the source of your HTML region.

          1 person found this helpful
          • 2. Re: Unable to use a format mask on hidden items?
            You may consider using the items post calculation computation setting:
            Enter a SQL or PL/SQL expression or PL/SQL function '<function-name>;' to refine the value of the item.
            For example, if this item is named P1_X, you could use post calculation expressions such as UPPER(:P1_X), INITCAP(:P2_Y), MIN(:P1_X,:P2_Y-200), NVL(:P1_X,:P2_Y), or a function call such as my_func(:P1_X); to set the final value of the item.
            Note that these examples demonstrate that the expressions can reference the current item, or they may reference any other item in session state.