Skip to Content
avatar image
Former Member

Display all groups in the header section with condition

Hi All,

I've been turning around an issue for 2 days that looks simple to me in the beginning.

Actually I have a group on a database field in my report that displays always 2 values (groups). It's working correctly but I need to bring it to the Header section and display the 2 values as an information.

The values I need are extracted from a table on these 2 conditions:

If Database.field A has value 1 then I need to display in the header the Value in the same row that shows under the field Name X

If Database.field A has value 2 then I need to display in the header the Value in the same row under the field Name Y


The problem is that if I copy the Group from details to the Header section, it shows only one value while I need to display both values consequently.


The ideal solution for me is to show in the report header :


Information A (displays if Database.field A = 1) : Displays to field Name X of this value

Information A (displays if Database.field A = 2) : Displays to field Name Y of this value


Thank you


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Apr 14, 2016 at 02:15 PM

    Hi Mohamed,

    Here's what you need to do:

    1) Create a formula (@X) with this code:

    If {Database_field} = 1 then 'Info to Display'

    2) Go to the Insert Summary option > Choose @X formula field as the 'Field To Summarize' > Choose 'Maximum' as the Summary operation > Under 'Summary Location', choose Group Footer or Report Footer (You can then move them to the Group Header or Report header as needed)

    3) Repeat Step 1 and 2 for 'Y'. Just change the formula name to 'Y'.

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 14, 2016 at 03:54 PM

    Ok, the issue is more complicated, let me explain more:

    Table 1.Field1

    Table 1.Field2

    Table 1.Field3

    1

    A

    X

    1

    B

    Y

    2

    A

    X

    2

    B

    Y

    3

    A

    X

    3

    B

    Y

    what I need to display in the header is 2 values X and Y.

    The conditions:

    1/ if field 1 has same values and Field 2 = A then display X

    2/ if field 1 has same values and Field 2 = B then display Y

    I hope this is more clear.

    Thank you

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 14, 2016 at 04:25 PM

    Sorry one correction:

    Table 1.Field1

    Table 1.Field2

    Table 1.Field3

    1

    A

    X

    1

    B

    Y

    2

    A

    S

    2

    B

    T

    3

    A

    U

    3

    B

    V

    Each time I need to display 2 values : X or Y, S or T u or V...

    Thank you

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 15, 2016 at 08:01 AM

    Hi Kumar,

    I meant:

    Table 1.Field1

    Table 1.Field2

    Table 1.Field3

    1

    A

    X

    1

    B

    Y

    2

    A

    S

    2

    B

    T

    3

    A

    U

    3

    B

    V


    1/ If field 1 contains same values (like here 1 and 1, 2 and 2..)  that means group on same values on field 1 then check for those 2 values the Field 2 if = A then display X (or related value)

    2/ same logic

    Assumptions:

    In Field1 values will always be in pairs

    In Field2 values will be always whether A or B

    In Field3 values will be all different

    Thank you

    Add comment
    10|10000 characters needed characters exceeded