Skip to Content
avatar image
Former Member

How can i sum to share value from sub report?

Hi All,

I have a sub-report and it will pass the value to the main report.

My Sub report is place at the Group H3a and the share value is place in Group H3b. I will like to sum this value in RFa. Below are my codes:

In Sub Report:

@SharePO_AMT

WhilePrintingRecords;
Shared CurrencyVar myTotalPOAMT := (Sum({PO101_ORD_DTL.PO101_EXT_COST}))

Main report:

@Share_POTotalAMT

WhilePrintingRecords;
Shared CurrencyVar myTotalPOAMT;
myTotalPOAMT

I have 2 issue here.

1. In each GH3b, the value keep repeating

2. how can I get the total amount?

Thanks!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 27 at 04:50 AM

    Hi Mavis,

    Modify the formula on Group Header 3b to:

    WhilePrintingRecords; 
    Shared CurrencyVar myTotalPOAMT;
    currencyvar gtot := gtot + myTotalPOAMT;

    Create another formula with this code and place this on Report Footer:

    WhilePrintingRecords; 
    currencyvar gtot;

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded