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

Master Detail -> infinite loop

edited January 2002 in General
I have this report with 1 Master dataset, 1 Detail dataset, 1 group which
force
new page to be generated on new master record.
When all the details record fits into one page everything goes well.
When there's a Master record wich has several detail records, the first page
is correct, but when i proceed to the second i obtain the same first page.
And so on for the third, and the fourth...

What's the matter with my report ?
TIA
Damiano

Comments

  • edited January 2002
    Make sure the datapipelines for the report and subreport are connected
    properly. Connect the master and detail datasources to dbGrids on a form.
    Are the detail datasets as expected, as you click the master records in the
    master grid, at runtime?

    What version of RB are you using? Try upgrading to the latest version:
    6.03.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited January 2002
    Thank you for answering.

    This is really strange. Datapipelines are connected properly.
    The matter is: i have all my report components enclosed in dlls. When i need
    to
    print something i load the corresponding dll, wich will load the
    corresponding
    template and do the work. The same dll could be loaded by different
    functions
    of my application... and that's the strange thing. If i have a dll instance
    already
    loaded, the report is generated correctly (even if there are master records
    with
    several detail). If there aren't other instance of the same dll loaded, the
    master
    record with several details causes infinite loop...

    Am I missing something about including RB components in Dlls ??

    The version I'm using is rather old (4.2)... but i've tried with the trial
    of the latest
    version and i obtain the same behaviour...


  • edited January 2002
    Where are the datapipelines located, relative to the reports? Try placing
    the datapipelines in the same form as the report. Perhaps the datapipelines
    aren't being located correctly by RB? Make sure that every datapipeline has
    unique names. We provide a dll example in the installation and it has the
    datapipeline located with the report, and it is working correctly.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited February 2002
    Everything is placed on the same form as the report, except the Connection
    component. My application works exactely as your demo shows. And it works
    great when I havent' got too many details for a particular Master record.

    When i have a master record with too many details (so that a second "master"
    page
    has to be printed) in that second page I found the same detail records of
    the first page.

    The reports look like this :

    Master 1
    Detail 1-1
    Detail 1-2
    Detail 1-3
    Footer 1
    =======
    Master 2
    Detail 2-1
    Detail 2-2
    Footer 2
    =======
    Master 3-1
    Detail 3-1
    Detail 3-2
    Detail 3-3
    =======
    Master 3-2
    Detail 3-1 <--- instead of Detail 3-4
    Detail 3-2 <--- instead of Detail 3-5
    Detail 3-3 <--- instead of Detail 3-6
    ... Infinite loop...

    If i never have a situation like the Master 3... everything is ok.
    Viceversa, everything works correctly if i have already loaded an instance
    of the same Dll (i mean only create the form containing Report,
    DataPipelines
    and Datasets. No Report Template loaded, No DataSet opened.)

    In the footer I have a SubReport showing some Summary information, and its
    DataSet is in Master/Detail relation with the Master DataSet...
    Could it be this causing all this problems ?

    I know... it's an annoying question...
    but i can't find out where i'm doing wrong !

    If you have any ideas... I thank you in advance!


    datapipelines
    has
This discussion has been closed.