Skip to Content
avatar image
Former Member

Help with report please

I have a report with 3 columns.The field names are column1 = {Product.Grade1}, column2 = {Product.Grade2} and column3={Product.Grade3}.

Each column can have any value from A to C . For each column, I am trying to total records that have only the instances that ‘A’ is shown in the column.

First, I wrote a formula to display only the A in the column1

The formula I used for column 1:IF {Product.Grade1} ="A"

THEN {Product.Grade1}

ELSE ""

This displays only the A in the first column.However, when I try to get a total of only the A’s it will give me a total of everything that is in the column, visible or hidden.

How do I get it to display only the count for the A’s in each column?

Thank you for your help.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Feb 22, 2017 at 12:15 AM

    I guess when you say report it is ALV, try using the filters of ALV

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 22, 2017 at 12:33 AM

    Hi Gina,

    You can create a Running Total like:

    WhilePrintingRecords; 
    NumberVar ACount; 
    If {Product.Grade1} = "A" Then 
        ACount := ACount + 1; 
    If {Product.Grade2} = "A" Then 
        ACount := Acount + 1; 
    If {Product.Grade3} = "A" Then 
        ACount := ACount + 1; 

    Drop this into your Detail section and you can hide it.

    Create another formula to show the count like:

    WhilePrintingRecords; 
    NumberVar ACount; 

    Drop this into your Report Footer and you should get your total.

    If your report is grouped then put the second formula in the Group Footer and in the Group Header add this formula:

    WhilePrintingRecords; 
    NumberVar ACount := 0; 

    This will reset the count to 0 for the new group.

    Hope this helps,

    Brian

    Add comment
    10|10000 characters needed characters exceeded