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

Regarding accessing fields of subreport in another subreport

Hi Guys,

I am creating three subreports.I need to subtract a field in subreport 1 from a field in subreport 2 and the subtraction needs to be done in subreport 3 and the resulting value also needs to be displayed in subreport 3. I also need to access other fields of subreports 1 and 2 in the third subreport. Any help will be much appreciated.


Thanks and regards,

Ashwin

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jul 20, 2016 at 09:28 AM

    Hi Ashwin,

    Use shared variables inside each Subreport.

    Inside Subreport 1, create a formula with this code:

    shared numbervar v1 := {Value to be shared};

    Inside Subreport 2, create a formula with this code:

    shared numbervar v2 := {Value to be shared};


    Inside Subreport 3, create a formula with this code:


    shared numbervar v1;

    shared numbervar v2;

    v1 - v2;


    For this to work correctly, Subreport 3 needs to be on a section below the other sections that hold Subreport 1 and 2.


    -Abhilash

    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.