2 Replies Latest reply on Jan 16, 2014 8:02 AM by disabled_rcmiller9

    Report Including Related Records


      Report Including Related Records


           Can someone point me to a resource or post which describes the steps necessary to create a report that:

           1.  Includes the names, addresses, etc from a table of individuals.

           2.  The donations made by the individuals on various dates and in various amounts.  This information is from a simple related many table.  Some individuals will have one related record, others will have many.  Subtotals and grand totals are not necessarily required.

           3.  And, finally, the user should be able to choose the individuals included in the report.  That is, persons from city A or city B. Or those who made donations in April or May.

           I think all I need is an example or a good description of the steps necessary to create the format.


        • 1. Re: Report Including Related Records

               This starts with details missing from your initial description. Best guess is that you have a one to many relationship between Donors and Donations though your names for these tables and fields may be different than what I am using:


               Donors::__pkDonorID = Donations::_fkDonorID

               If so, the report you describe can be set up on a layout based on Donations rather than Donors. You can list the desired fields from Donations in the body of the layout. You can set up a sub summary layout part (When sorted by _fkDonorID)  and put fields from Donors in the sub summary layout part so that it serves as a "sub head" for the donations made by that donor. You can even have two such parts, one above and below the group of donation records. If you define a summary field in Donations for computing the total donation amounts, you can place this summary field inside such a sub summary part to show the total donations made by a single Donor.

               And it's possible to get a report where there is a single row with the donor's info and a total instead of a list of the individual donations.

               To get a report for a specific group of donors, you would normally perform a find on this report layout specifying the criteria that you need in order to find the donations made by those donors. This can be a manual find, but often it is scripted. Either way, you'll need to sort the found set of records by _fkDonorID in order to properly group them by Donor or the sub summary layout parts will not be visible. ( Would sort first by DonorID and then by Donor name to get an alphabetized list of donors in such a report.)

               Here's a thread with a lot of scripted find examples that you may find helpful: Scripted Find Examples

               And here's a tutorial on creating these kinds of summary reports: Creating Filemaker Pro summary reports--Tutorial

               For an explanation of the relationship notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained

          • 2. Re: Report Including Related Records


                 Just what I needed.  Thank you.