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

Calculating totals on a value in a header band

edited August 2003 in General
Greetings

I'm using Delphi 5 with RB standard 6.03. I have a master-detail report set
up with a group header containing a name and address. I have a subreport in
the detail band to print all related records for the particular master
record. I have a summary band where I want to print a count of master
records. I'm using a DBcalc component for this (type of count on the name
field that prints in the group header band).

When I get multiple records printing in the subreport, I get extra records
"counted in my summary total. For example, if I have 2 master records, but
one of them has 2 detail records, my summary count will be 3, rather than 2.

I've looked through the samples and the developer's guide, and can't see
where I've gone wrong. Any suggestions?

Thanks in advance

Mark Anderson

Comments

  • edited August 2003
    Hi Mark,

    Please send a small example demonstrating the problem in .zip format to
    support@digital-metaphors.com and I'll take a look at it for you.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2003
    Greetings

    The problem turned out to be a corrupt data pipeline. I deleted the
    pipeline component, added a new one, connected the dots, and everything
    worked as it should.

    Regards

    Mark

  • edited August 2003
    >"Mark Anderson" wrote in message news:3f398cfb@dm500....

    [snip]

    but
    2.

    Hi Guys,

    I am using D6 upd 2 w/ RB 6.05 Std. I am encountering this same problem
    with a DBCalc set to dcsum. What happens is the value in the header is
    added to the sum for each detail record that is calculated.

    I have qMaster, dsMaster and qDetail, dsDetail with two TppDBPipelines:
    plMaster and plDetail. Linking is done throught the datasets, not the
    pipelines.

    Any help would be appreciated,
    Thanks in advance,
    David Fidler

    Noratek Solutions, Inc
    http://www.noratek.com
    dfidler@noratek.com

    --------------

    object plMaster: TppDBPipeline
    DataSource = dsMaster
    UserName = 'plMaster'
    Left = 54
    Top = 232
    object plMasterppField1: TppField
    Alignment = taRightJustify
    FieldAlias = 'ArTransID'
    FieldName = 'ArTransID'
    FieldLength = 0
    DataType = dtDouble
    DisplayWidth = 0
    Position = 0
    end
    object plMasterppField2: TppField
    Alignment = taRightJustify
    FieldAlias = 'UserID'
    FieldName = 'UserID'
    FieldLength = 0
    DataType = dtInteger
    DisplayWidth = 10
    Position = 1
    end
    object plMasterppField3: TppField
    FieldAlias = 'CustomerID'
    FieldName = 'CustomerID'
    FieldLength = 20
    DisplayWidth = 10
    Position = 2
    end
    object plMasterppField4: TppField
    FieldAlias = 'ArType'
    FieldName = 'ArType'
    FieldLength = 20
    DisplayWidth = 20
    Position = 3
    end
    object plMasterppField5: TppField
    Alignment = taRightJustify
    FieldAlias = 'IsDebit'
    FieldName = 'IsDebit'
    FieldLength = 0
    DataType = dtInteger
    DisplayWidth = 10
    Position = 4
    end
    object plMasterppField6: TppField
    FieldAlias = 'ArTransDate'
    FieldName = 'ArTransDate'
    FieldLength = 0
    DataType = dtDateTime
    DisplayWidth = 10
    Position = 5
    end
    object plMasterppField7: TppField
    FieldAlias = 'Reference'
    FieldName = 'Reference'
    FieldLength = 40
    DisplayWidth = 40
    Position = 6
    end
    object plMasterppField8: TppField
    Alignment = taRightJustify
    FieldAlias = 'ArAmount'
    FieldName = 'ArAmount'
    FieldLength = 0
    DataType = dtDouble
    DisplayWidth = 15
    Position = 7
    end
    object plMasterppField9: TppField
    FieldAlias = 'NetDate'
    FieldName = 'NetDate'
    FieldLength = 0
    DataType = dtDateTime
    DisplayWidth = 10
    Position = 8
    end
    object plMasterppField10: TppField
    FieldAlias = 'CashDiscountDate'
    FieldName = 'CashDiscountDate'
    FieldLength = 0
    DataType = dtDateTime
    DisplayWidth = 18
    Position = 9
    end
    object plMasterppField11: TppField
    Alignment = taRightJustify
    FieldAlias = 'CashDiscountAmount'
    FieldName = 'CashDiscountAmount'
    FieldLength = 0
    DataType = dtDouble
    DisplayWidth = 15
    Position = 10
    end
    object plMasterppField12: TppField
    Alignment = taRightJustify
    FieldAlias = 'IsChargeInterest'
    FieldName = 'IsChargeInterest'
    FieldLength = 0
    DataType = dtInteger
    DisplayWidth = 10
    Position = 11
    end
    object plMasterppField13: TppField
    Alignment = taRightJustify
    FieldAlias = 'BankDepositGlTransID'
    FieldName = 'BankDepositGlTransID'
    FieldLength = 0
    DataType = dtDouble
    DisplayWidth = 10
    Position = 12
    end
    object plMasterppField14: TppField
    FieldAlias = 'Notes'
    FieldName = 'Notes'
    FieldLength = 0
    DataType = dtMemo
    DisplayWidth = 10
    Position = 13
    Searchable = False
    Sortable = False
    end
    object plMasterppField15: TppField
    Alignment = taRightJustify
    FieldAlias = 'IsEntryHold'
    FieldName = 'IsEntryHold'
    FieldLength = 0
    DataType = dtInteger
    DisplayWidth = 10
    Position = 14
    end
    object plMasterppField16: TppField
    Alignment = taRightJustify
    FieldAlias = 'BatchID'
    FieldName = 'BatchID'
    FieldLength = 0
    DataType = dtDouble
    DisplayWidth = 10
    Position = 15
    end
    end
    object plDetail: TppDBPipeline
    DataSource = dsDetail
    UserName = 'plDetail'
    Left = 140
    Top = 231
    MasterDataPipelineName = 'plMaster'
    object plDetailppField1: TppField
    FieldAlias = 'AccountID'
    FieldName = 'AccountID'
    FieldLength = 0
    DisplayWidth = 0
    Position = 0
    end
    object plDetailppField2: TppField
    Alignment = taRightJustify
    FieldAlias = 'Debit'
    FieldName = 'Debit'
    FieldLength = 0
    DataType = dtDouble
    DisplayWidth = 15
    Position = 1
    end
    object plDetailppField3: TppField
    Alignment = taRightJustify
    FieldAlias = 'Credit'
    FieldName = 'Credit'
    FieldLength = 0
    DataType = dtDouble
    DisplayWidth = 15
    Position = 2
    end
    object plDetailppField4: TppField
    FieldAlias = 'JobID'
    FieldName = 'JobID'
    FieldLength = 20
    DisplayWidth = 12
    Position = 3
    end
    object plDetailppField5: TppField
    FieldAlias = 'AccountDescription'
    FieldName = 'AccountDescription'
    FieldLength = 40
    DisplayWidth = 40
    Position = 4
    end
    object plDetailppField6: TppField
    Alignment = taRightJustify
    FieldAlias = 'ItemID'
    FieldName = 'ItemID'
    FieldLength = 0
    DataType = dtDouble
    DisplayWidth = 10
    Position = 5
    end
    object plDetailppField7: TppField
    Alignment = taRightJustify
    FieldAlias = 'ArTransID'
    FieldName = 'ArTransID'
    FieldLength = 0
    DataType = dtDouble
    DisplayWidth = 10
    Position = 6
    end
    end
  • edited August 2003
    Hi David,

    Please send an example demonstrating the issue in .zip format to
    support@digital-metaphors.com so we can take a closer look at what is going
    on.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.