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

SubReport-Bug in ppEngine / ppClass?

edited February 2004 in General
Hi,

like so many others I spent days investigating a problem with
suppressed subreport entries in my pilot report application searching
for a solution. The second visited page always wasn't put together
correctly until exiting and reentering. Then I examined ibopipeline
ending up with rb, where I possibly found a bug in the engine.


When processing a new detail band / subreport I noticed that sometimes
entering TppEngine.Generate FMasterDatapipeline is set while
FMasterDatapipeline.State is [ppdaNoRecords] (not initialized to []?).

So in TppEngine.Init the result of DataFound is False:

if (FMasterDataPipeline <> nil)
and ( (ppdaNoRecords in FMasterDataPipeline.State)
or (FMasterDataPipeline.BOF and FMasterDataPipeline.EOF))
then
Result := False;

Therefore the Pipeline is assumed empty (though data may be present)
whereupon no output is generated.


I assume this might be the reason for unexpectedly missing data in
subreports reported by several programmers for so long - and maybe
even discouraging them from using rb at all.


Currently the following temporary fix of ppEngine.pas works well for
me, but concerning side effects better wait for a statement from the
developers:

procedure TppEngine.Generate;
begin
{clear indicators}
// Fix ...
if Assigned( FMasterDatapipeline)
then
FMasterDatapipeline.State := [];
// ... Fix
GenerateCompleted := False;
...


Regards,

Christian

Comments

  • edited February 2004
    Hi Christian,

    Thanks for the information. If possible, please send a small example or let
    me know how to recreate this problem using one of our demos so I can
    recreate it and add your proposed fixes to the next release. Thanks again
    for your help.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2004
    Hi Nico!

    Sorry, but I have no small example. I would have been happy, if you
    were able to reproduce my findings based only on my hints on the
    source code. I didn't succeed in reproducing the bug with a new app
    based on your examples.

    I work here with a firebird 1.5 database with nearly 1,5 million data
    entries in 36 tables. I tried to embed RB in the related Delphi
    application with about 50 forms. Shrinking the data to a transferable
    size will take some time. Possibly there may be anyone else out there
    with a small app showing a comparable misbehaviour cured by my fix.

    I'll be in touch.

    Regards,

    Christian
This discussion has been closed.