Get a Jumpstart with our Sample Apps
Results 1 to 5 of 5

Thread: Subreport multiple child issue

  1. #1
    Member
    Real Name
    Erik Flom
    Join Date
    Jun 2007
    Posts
    51

    Default Subreport multiple child issue

    Hello,
    I am working on a report that consists of 1 parent and 2 child tables, linking on a single common column. The 2 child tables have essentially the same types of data, but having 2 different tables made using a tabbed grid linker very easy (without having to save some kind of "type" identifier in the different grids).. My database is SQL Server and the report SQL connection is ad hoc..

    Anyway, I am getting multiple copies of the same records within the 2 sub reports I have included in the main report.. So, if for a single record in the parent table there are 2 rows in child 1 and 3 rows in child 2, then the subreports display 6 rows of data in each subreport area (2x3)

    What I was hoping Alpha did was similar to what I can do with Crystal: Define the main report based on the parent table, define the 2 subreports based only on those child tables, and then they are linked via parameter fields in the main report definition.

    So my options are mess with the SQL connection and try to apply filters at that level, maybe, or work with the filters in the subreports themselves. I am not sure how to modify the SCANNING("SQLDATASOURCE") filter that is applied to the subreports by default. Is there a test for uniqueness I could use? Suppress duplicates or something like that? Each child table has a row_id column that is a unique identifier, but there could be 2 row_ids that match between the child tables...

    Sorry if the above is confusing..

    TIA

    Erik

  2. #2
    "Certified" Alphaholic
    Real Name
    Chris Tappan
    Join Date
    Jun 2009
    Location
    Knoxville, TN
    Posts
    1,252

    Default Re: Subreport multiple child issue

    I know this is an old post. but I need the same thing--did you ever figure this out?

  3. #3
    Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,382

    Default Re: Subreport multiple child issue

    Quote Originally Posted by christappan View Post
    I know this is an old post. but I need the same thing--did you ever figure this out?
    Easiest to explain with an example..
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  4. #4
    "Certified" Alphaholic
    Real Name
    Chris Tappan
    Join Date
    Jun 2009
    Location
    Knoxville, TN
    Posts
    1,252

    Default Re: Subreport multiple child issue

    I've got a report that pulls from 4 SQL tables, three of which are Left Outer Joins, so the records returned for each table have redundant values (I hope that makes sense). A smaller hypothetical example:

    SELECT *
    FROM Monthly_Documentation
    LEFT OUTER JOIN Contacts
    ON Monthly_Documentation.Cust_ID = Contacts.Cust_ID AND month(Monthly_Documentation.Date) = month(Contacts.Contact_Date) AND year(Monthly_Documentation.Date) = year(Contacts.Contact_Date)
    LEFT OUTER JOIN Tasks
    ON Monthly_Documentation.Cust_ID = Tasks.Cust_ID AND month(Monthly_Documentation.Date) = month(Tasks.Date_Assigned) AND year(Monthly_Documentation.Date) = year(Tasks.Date_Assigned)
    WHERE Monthly_Documentation.MD_ID = :MD_ID

    | Monthly_Documentation | Contacts.Contact_Date | Contacts.Contact_Type | Tasks.Date_Assigned | Tasks.Status |
    | 6/1/2012 | 6/5/12 | Phone | 6/7/12 | Open |
    | 6/1/2012 | 6/15/12 | Email | 6/7/12 | Open |
    | 6/1/2012 | 6/5/12 | Phone | 6/18/12 | Pending |
    | 6/1/2012 | 6/15/12 | Email | 6/18/12 | Pending |

    What I'd like is to have in the report design is a subreport showing unique records from the Contacts table and a subreport showing unique records from the Tasks table, but each subreport has a duplicate record.

    How?

  5. #5
    Member J.R. Noe's Avatar
    Real Name
    J.R. Noe
    Join Date
    Feb 2011
    Location
    Brandenburg, KY.
    Posts
    398

    Default Re: Subreport multiple child issue

    Was this ever resolved? I have the same issue.

Similar Threads

  1. Multiple grids based on parent/child
    By SCJBF in forum Application Server Version 8
    Replies: 3
    Last Post: 11-12-2007, 04:17 AM
  2. Parent Child Issue
    By RHoward3232 in forum Alpha Five Version 8
    Replies: 6
    Last Post: 04-23-2007, 04:30 PM
  3. Changing Multiple Child fields from Parent
    By paulyp in forum Alpha Five Version 7
    Replies: 3
    Last Post: 01-09-2006, 10:06 AM
  4. A thought about the issue of multiple data sets ..
    By drgarytraub in forum Alpha Five Version 5
    Replies: 10
    Last Post: 12-08-2003, 07:35 AM
  5. Multiple lines per child record
    By Mike Lange in forum Alpha Five Version 4
    Replies: 3
    Last Post: 05-15-2002, 09:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •