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

print problem if empty second dataset.....

edited June 2001 in General

Hello,

RBPro 5.56Ent, D5Ent,

database MSSQL :
create table alfa (id int identity primary key, atext varchar(255))
create table beta (IDalfa int REFERENCES alfa(id), btext varchar(255))

alfa :
1 one
2 two
3 three
4 four
beta :
1 1111
3 3333
4 4444
ALFAQuery.SQL.Text := 'select * from alfa'
BETAQuery.SQL.Text := 'select * from beta where IDAlfa=:ID'

so, and now, I want to print it....
one subreport - alfa.
and in the Detail band DBText1 connected to PipelineALFA
and DBText2 connected to PipelineBETA.
Problem is , that the record nr.2 is not printed,
there is no record in BETAQuery for the second alfa record,
but it should be printed ALFA.Query.recordno 2. why not ???

trying print beta info in second subreport, will be the same, :((

what should it be ?
how to quickly fix it, without changing Delphi code ???

Sl?va

--
Kv?toslav Jansta
LCS International, a.s.
mailto : KJ@Lcs.cz
http://www.lcs.cz
ICQ: 51076087

Comments

  • edited June 2001
    ok, I have found that it was in property SkipWhenNoRecords od Pipeline
    that is defaulted setted to True.

    I thing that in RBPro 5.0 there was no problem with this,
    but now in 5.56 I have to set it manually to False;

    Sl?va

    --
    Kv?toslav Jansta
    LCS International, a.s.
    mailto : KJ@Lcs.cz
    http://www.lcs.cz
    ICQ: 51076087
  • edited June 2001


    --------------------------------------------------------------------
    Article: Migrating Master/Detail reports to RB 5.5x
    --------------------------------------------------------------------

    The following assumes you are using RB 5.52 or later....

    Starting with RB 5.5, the data traversal logic and report engine have
    been enhanced to support the new DADE linking features and to improve
    the ability of subreports to handle detail data.

    In the past the subreport did NOT properly honor the detail datapipeline
    SkipWhenNoRecords property. Now that this deficiency has been fixed it
    is causing some confusion.


    To convert old reports that use subreports to print detail data:

    1. Set the detail DataPipeline.SkipWhenNoRecords property to False.

    When SkipWhenNoRecords is False, master records that contain no detail
    data will NOT be skipped and will appear in the report.

    2. Use the default NoDataBehaviors property value of [ndBlankPage].

    When ChildReport.NoDataBehaviors = [ndBlankPage], the subreport will
    simply exit and not print if there is no detail data.

    Note: The NoDataBehaviors property was added in RB 5.52 to provide
    better control over how a report/subreport behaves when there is no
    data.


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.