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

Help! Problem with disappearing last record

edited August 2001 in General
Hi,

My report has two SQL Queries linked for Master/Detail data using RB
DataPipeline linking. The report has PassSetting set to psTwoPass.
When the master query returns only the last record of dataset the detail
record first is shown on preview then it disappears! When the master query
return only the first record or more records - detail records can be seen.
When I set PassSetting to psOnePass the detail record appears correctly in
all cases.

I manually set ppSubReport1.Visible property value depending on previous
user choice. I do it in FormCreate event of the form which has report
component.

I must use two passes because I want to have the label displayed on the last
page which tells the user it is really the last page.
I check it out using the following code in OnStartPage:

if ppReport1.AbsolutePageNo = ppReport1.AbsolutePageCount then
ppLabelEndOfReport.Caption := '- End of report -'
else
ppLabelEndOfReport.Caption := '';

When I had only one pass it did not worked.
So my sub-question is - can I set properly ppLabelEndOfReport.Caption
without using two passes?

Thank you
Janusz

Comments

  • edited August 2001
    I ran a linked query example, and set the master datapipeline to traverse
    the last record (DataPipe.RangeBegin = rbLastRecord), and it printed the
    last master record and the detail records. The report was TwoPass and I was
    running the installed RB 6.01 version. Are you using 6.01?


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited August 2001
    I'm using 6.00 with Delphi 4. When I put DataPipe.RangeBegin = rbLastRecord
    in my program
    I got an empty preview page... Neither master record nor detail record
    information was displayed...
    When I returned to default value of DataPipe.RangeBegin, add a second detail
    record for the last master record and then printed a query which brought
    only the last master record, both detail records appeared. When I deleted
    the new detail record the situation was once again as it was before - the
    detail record appears first then disappears for the query with only last
    master record.

    Thank you
    Janusz

  • edited August 2001
    I have these settings on the master pipeline:

    RangeBegin = rbLastRecord
    RangeEnd = reCount
    RangeEndCount = 1

    Download RB 6.01. Contact info@digital-metaphors.com with your full
    registration information and you'll receive a download link.

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited August 2001
    Jim,

    I had other settings:

    RangeBegin = rbLastRecord
    RangeEnd = reLastRecord
    RangeEndCount = 0

    Now, when I changed it to yours, the detail record of the last master record
    can be seen even in my 6.00 version.
    I got already the download link and I'll give it a try, but could you check
    out what happens if you query only the last master record in your example,
    please?

    Thank you
    Janusz


  • edited August 2001
    Setting both RangeBegin and RangeEnd to LastRecord isn't currently supported
    when using data pipeline linking.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited August 2001
    Jim,

    In fact I don't care about how RangeBegin and RangeEnd work in the moment. I
    have a different problem.
    I downloaded 6.01 and I have exactly the same behaviour.
    Once again: I have a report with two SQL Queries linked for Master/Detail
    data using RB
    DataPipeline linking. The report has PassSetting set to psTwoPass. When the
    master query returns only the last record of the dataset the detail record
    first is shown on preview then it disappears. When the master query return
    only the first record or more records - detail records can be seen. When I
    set PassSetting to psOnePass the detail record appears correctly in all
    cases.
    Here is what can I add now - when the master query returns two last records
    of the table, first of them with a detail record, second without it, the
    detail record also first appears and then disappears.
    I use now RB 6.01, Delphi 4 and DBISAM.

    Thank you
    Janusz

    supported
    example,
    in
  • edited August 2001
    Jim,

    The same bad behaviour I observed with Paradox tables, not only DBISAM
    tables.
    The important thing here is that additionaly the bad behaviour can be
    observed only when there is _one_ detail record for the last master record
    and this master record is the only one which is fetched by the master query.
    When I set the report to one pass I can see the detail record on the
    preview, after I run the preview the second time it is not seen anymore.
    When I set the report to two passes mode the single detail record blinks and
    disappers.

    Thank you
    Janusz
  • edited August 2001
    I set my master query to fetch one record. It previewed correctly with all
    of its detail records. Then I modified the detail query to return only one
    record. The report printed fine both in one and two pass settings. I'm
    sending you my project which you can modify and send back so that perhaps we
    can reproduce the problem.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited August 2001
    Jim,

    It seems that you do every possible effort to not reproduce the situation I
    have described .
    In your project you took the _first_, not the _last_ master record (I mean
    the primary index order). Secondly, I have _physically_ 1 detail record, not
    1 detail record fetched by the detail query.
    I have sent you the modified project and modified tables (all but 1 detail
    records which belong to the _last_ master record were deleted physically).

    Thank you very much
    Janusz


  • edited August 2001
    I do get the error with one detail record in the dataset with your example.
    I sent the previous post before I received your project yesterday and was
    able to run it. Thanks for the example which clarified exactly what I
    needed to see the problem.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited August 2001
    Jim,

    What is the status of the problem? Can I hope to be informed when if will be
    fixed?

    Thank you
    Janusz


  • edited September 2001
    It has been fixed for the next maintenance release. Thanks for the demo.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.