Skip to Content
author's profile photo Former Member
Former Member

IF statement / expressions help

Post Author: cht104

CA Forum: Formula

I've created a report to show number, date and amount. It works, but I want the numbers to be changed to a names in the group header only. I"ve tried several if / then or case statements, but keep getting different errors. Where should I create the formula? Is it a formula field or a SQL expression field?

I'm pulling 3 fields from 1 table; number date amount. The number column has a header of Group 1 Name. Group 1 Name is what I would like to use the IF expression

IF number = "12345" then Sam IF number = "54321" than Tom I've got multiple number -> name changes to make.

I know that I'm over thinking or trying to make more difficult than it should be and would greatly appreciate any help or suggestions.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2007 at 01:38 PM

    Post Author: bettername

    CA Forum: Formula

    Unless I misunderstand, it's pretty straightforward! Create a formula called "name_to_number":

    if number = 12345 then "Sam" else

    if number = 54321 then "Tom" else

    ...

    else totext(number,0)

    Then group by name_to_number, but leave in the details section.

    This will give you:

    Group Header: Sam

    Details: 12345 01/01/2006 54

    Details: 12345 02/04/2006 2

    Details: 12345 16/06/2006 34

    Group Footer: <empty>

    Group Header: Tom

    Details: 54321 11/01/2006 19

    Details: 54321 07/02/2006 4

    Details: 54321 10/03/2006 86

    Group Footer: <empty>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 12, 2007 at 03:01 AM

    Post Author: cht104

    CA Forum: Formula

    Thanks. I finally got it. I just had my db and table in the wrong brackets.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.