This discussion is archived
4 Replies Latest reply: Jul 15, 2010 2:29 PM by DC RSS

Formula column

773380 Newbie
Currently Being Moderated
Hi All,

I want to have a formula column outside the query group and in the formula column want to access a field in the query group. How to access a field in the query group in the formula column outside the query group ?

Please help. Hope I am clear, if not please let me know

Edited by: user2236618 on Jul 13, 2010 6:53 AM
  • 1. Re: Formula column
    InoL Guru
    Currently Being Moderated
    If you try that I guess you are getting the "REP-1517: Column '<column1 name>' references column '<column2 name>', which has incompatible frequency." message. What you can try is create a formula column (CF_1) in the query group that just returns the column value (e.g. "return :amount;").

    Outside your query group you create a (report level) placeholder that just returns the value of the formula column ("return :CF_1;").
  • 2. Re: Formula column
    773380 Newbie
    Currently Being Moderated
    Thanks for the reply.
    The formula column inside the query group works properly(gave srw.message and it returns the values correctly) whereas the report level place holder which returns :CF_1 is returning null (gave srw.message and it returns null values only)
  • 3. Re: Formula column
    InoL Guru
    Currently Being Moderated
    Yeah, that was a bit of a silly example. If you read the online help about placeholder columns you see:

    You can set the value of a placeholder column in:
    - a report-level formula column, if the placeholder is a report-level column
    - a formula in the placeholder's group or a group below it (the value is set once for each record of the group)

    So, in CF_1 you have to put:

    :CP_1 := :<your column>;

    But this may not make any sense in what you are trying to do. If you have a report level placeholder, at the end of the report the placeholder will just hold the last value.
    So, maybe you can explain what you are trying to achieve.
  • 4. Re: Formula column
    DC Pro
    Currently Being Moderated
    How to access a field in the query group in the formula column outside the query group ?
    You can't. It's like a calling function can't know a local variable value of a called function, or a higher level block can't know lower level block's variables. The reverse can be done though.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points