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

Passing a list of records from sub report to main report.

Hi Experts,

hopefully you can help me out with this issue.

I am trying to pass a list of records from a main report to a sub report.

My purpose eventually is to mark records in the sub report that are not available in the main report and

to suppress the records in the sub report when they are also there in the main report.

Linking the sub report to the main report is not an option in this case (in my opinion).

It would only suppress the records in the sub report I would like to appear.

For example the main report contains records;






and the sub report contains records;











as you can see both records have records 1-5.

So now the sub report has to suppress records 1-5 so that only records 6-10 are visible in the sub report.

If I try to pass values with a shared formula it seems it is only passing the first or last record from the main to the sub report and not the

whole list of records.

Thank you in advance for your time and help.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jan 07, 2014 at 12:48 PM

    Hi Pokey,

    If the Subreport is placed in the Report Footer, then you need to create a comma-separated string of values and pass it to the Subreport for filtering. Something like this:

    1) Create this formula called 'Values' and place it on the Details section of the Main report:

    stringvar s := s + totext({ID_field},0,"") + ", ";

    2) Right-click the Subreport > Change Subreport Links > Move the formula above to the Pane on the right > Uncheck the option 'Select data in subreport based on field"

    3) In the Subreport go to Report > Selection formulas > Record and use this code:

    Not(totext({ID_field},0,"") IN split({?Pm-@Values}, ", "))


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Abhilash,

      yes that's it!

      Had to adjust the totext formula a bit because of the error "To many arguments give etc etc." (just deleted the ~ ,0,"" ~ part)

      but then it works like a charm!

      Thank you very much again for your time and effort in helping me!!

      Much appreciated,



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.