Skip to Content
avatar image
Former Member

Summarizing a field in a sub-report within the main report.

I have seen the posts about this and the advice. Either 'A' since you cannot summarize a calculated field in the sub-report, create three formulas in the main report, one in the header to reset, one in the group under the subreport and the third in the group footer to display. Or create a formula in main to be assigned to the value being passed from the sub-report.  This approach causes the value to grab the previous record, I'll show in screen shot attached.

In the first screen shot the field outlined in red, is the correct amount based on the linking and the criteria from the sub-report.  So the end results are that I need the field in the red border to be summed by group #3 item#3

I have tried to pass both parts of the calculated field from the sub-report and calculated them in a formula in the main, no good. So can anyone point me in the right direction, any help would be greatly appreciated.

Regards,

Edmund

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 12, 2015 at 10:48 PM

    Hello,

    you must use shared variables, and tell the CR engine to do in the correct processing step: when you printing the recrods.

    please check this tread

    http://scn.sap.com/thread/2147940

    I hope it helps,

    János

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      In the attached image, it show the issue I am having with the variable in the main report. The subreport fields are not summary fields.  I have tried to pass the calculation of the two fields, "Qty*"MatCost", but I get the same results, the variable is along side the record from the previous record, highlighted in green.  I also tried the three formula approach, with a reset in the header and a display field in the group footer, still not working.  Can you explain why the misalignment and repeated values?

      Greatly appreciated.

      Edmund