Skip to Content
0

Number not adding up

May 25, 2017 at 02:36 AM

69

avatar image

HI all, I am creating a report with a sub report.

The sub report will pass a value to the same report detail. At the end, I will want to Sum up the value. I have issue adding up the value as I Share the value from the sub report.

Can anyone advise what is the work around?

In my report, I have a group which is "Category". I need to have the sub total of Category and grand total.

My share value in the main report named as "ShareAmt".

My report looking something like this .

I am unable to get the Total amount of 300 and 600 and grand total of 900.

Tried to created another sub report, the sub total for dinner only show 200and the sub total for lunch always show 100 only.

Noticed for total it always only show the last invoice amount.

Please advise.

Thanks!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Kevin Allen May 25, 2017 at 02:57 AM
0

Hi Mavis,

This is likely to be due to the way Crystal Reports processes objects or better said CR processes some objects before others, so some things get ignored.

Just to clarify: So you are passing a value from the sub-report back to the main report in the same section, correct? Now you want to sum the values in the main report, including the value that you are retrieving from the sub-report?

What section is the sub-report in? Which section do you want the total and grand totals to be in?

Thanks,
Kevin

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi Kevin,

Thanks for your prompted response.

From Sub report I pass the value to the main report detail session. I sub report I place it at Da and my value I place it in Db.

I will need to sum the value in Group 1 and RF.

0

Hi Mavis,

It is hard to say without seeing your report. However, I think that you may need to create a manual running total. Basically, a manual running total consist of 3 formulas, a reset, accumulate and display formulas, and the formulas will looks like:

    • Reset formula: ( Added to the Report Header, or Group Header section )

      WhilePrintingRecords;
      NumberVar myVariable := 0; // Set, or reset the value to zero.
      • Accumulate or Evaluate formula: ( Generally added to the Details section, but could be other sections depending on the requirement )

        WhilePrintingRecords;
        NumberVar myVariable := myVariable + 1
        • Display formula: ( Added to the Group Footer, or Report Footer section )

          WhilePrintingRecords;
          NumberVar myVariable

        You can find more about running totals in the CR help. Press F1 in the CR designer and the help will come up.


        Thanks,
        Kevin

        0

        Hi Kevin,

        That is what I did but the total value will always remind as the value of the last Invoice value.

        I place the sharevalue in both GF1 and PF all getting from the last invoice value.

        Thanks.

        0
        Mavis Yew May 30, 2017 at 01:00 AM
        0

        HI,

        Anyone can advise on the above. I tried the way Kevin advised but still having the same issue.

        Thanks!

        Share
        10 |10000 characters needed characters left characters exceeded