Skip to Content
author's profile photo Former Member
Former Member

Add Totals to Main report from 3 subreports

I have a main report with 3 subreports (in footer A, B, C). Each subreport has a Total field in it. Is it possible to add a field to the main report that will add each of the Subreport totals?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2009 at 01:42 AM

    Hi ,

    Create a shared variable in each of the subreports.

    Pass the shared variables which contains data from subreport to main report.

    Created a formula in main report which will add these shared variables.

    Hope it helps!

    Regards,

    Sumit Kanhe

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks. I've looked in the Help on how to do this but can't figure it out. How do I create a shared variable in each of the subreports? Do I create a formula? If so, what should the formula say and how do I share it amongst all the reports? Thank you again.

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2009 at 02:55 AM

    Hi Shannyn,

    Create a formula in main report as:

    Shared a;

    a;

    Create a formula in subreport and place in detail section:

    Shared numbervar a;

    a:={customer.customer ID};

    a;

    We can download Sample Reports from [here|Crystal Reports Samples]

    Regards,

    Shweta

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      a few other points on shared variables,

      do not surpress the section or the formula in the subreport or it wont pass the value

      place the main report shared variable below the subreport, otherwise it wont display the value

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 02:08 AM

    It worked! Awesome! Thank you.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.