Home Subreports
New Blog Posts: Merging Reports - Part 1 and Part 2

recursive tables in subreports

edited December 2002 in Subreports
Hi,

I'm trying to get data in subreports from 1 table with a reference to
itself.

In the querybuilder there is no problem, I can see all data, but in the
third level subreport no data is displayed.

What am I doing wrong?

Using Delphi 5, IBObjects, RB6.03

Jeroen

Comments

  • edited December 2002
    Is the third level subreport connected to the pipeline? Is visible set to
    True? Place a colored shape in the title band of that 3rd subreport to see
    if it prints.

    One way to verify that the data is there is to place use data access
    components on a form and use linking on the dataaccess components. This
    takes RB out of the picture for a minute. Hook the datasources up to a
    TDBGrid. Then when you click on the different master records of hte master
    grid, the detail grids should show the detail records.

    Hit Ctrl-mouse click over the third dataview. Does the Magic SQL look like
    it is going to retrieve all of the detail records based on its master
    (ordered on both the linking field and all master order by's).

    Have you tested with RB 7?

    I was able to build a 3 deep linked report with 3 subreports all using the
    same table and linking each of the three detail dataviews to the master
    though they all used the same table. All subreports printed.

    If you still can't get it working, then send a demo to
    support@digital-metaphors.com I have IBO 4.2. Can you recreate the problem
    using the IB Employee.gdb sample database?

    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited December 2002
    Jim,

    Third level subreport is connected to the pipeline salesordersection3:

    Queries are as follows:

    Salesorder master
    Salesordersection detail of salesorder
    Salesordersection2 detail of salesordersection
    Salesordersection3 detail of salesordersection2

    If I look with MagicSql I can see all records at all levels.
    The SQL looks ok.

    3rd subreport doesn't print if connected, but will print if not connected to
    a pipeline.

    further testing shows that if you link a detail to Salesordersection2 it
    also doesn't show, so it appears to be a problem with a recursive table.

    Not tested RB7 yet.Is there changed anything regarding this in RB7?

    Jeroen


  • edited December 2002
    Can you send us a simple working example project that shows the problem to
    support@digital-metaphors.com

    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.