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

Numbering Detail-Lines

edited September 2006 in General
What's the suggested way to print the record number at the beginning of the
detail line.
I'm using a TppLabel and fill it with ppDetailBand2.count.

--
Norbert

Comments

  • edited September 2006
    Hi Norbert,

    Try placing a DBCalc component in the detail band and set its calculations
    to Count(*).

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2006
    Am Fri, 22 Sep 2006 07:11:34 -0600 schrieb Nico Cizik (Digital Metaphors):


    In my case Count(*) gives me always zero.
    I've done it with
    object rvLfdNr: TppVariable
    CalcType = veDataPipelineTraversal
    DataType = dtInteger
    DisplayFormat = '"("0")"'
    OnCalc = rvLfdNrCalc
    ResetComponent = ppGroup1
    ResetType = veGroupStart
    CalcDataPipelineName = 'rpE'
    end
    and
    procedure TrbDr.rvLfdNrCalc(Sender: TObject; var Value: Variant);
    begin
    rvLfdNr.Value := rvLfdNr.Value + 1;
    end;

    rvLfdNr.Value instead of Value was necessary to realize the DisplayFormat.

    --
    Norbert
  • edited September 2006
    Hi Norbert,

    Glad you got it working. A DBCalc with the calculation Count(*) should not
    ever keep giving 0 if it properly connected to a dataset. Be sure it was
    connected to the dataset the report is connected to.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2006
    Am Tue, 26 Sep 2006 06:57:50 -0600 schrieb Nico Cizik (Digital Metaphors):


    Surprise, surprise: I've added a new TppDBCalc to the detailband, typed *
    for datafield, set the resetgroup and - it works.
    Don't know whats wrong in the first try. I'd only choosen a datafield
    instead of typing *. But this works now also.
    Thank you.

    --
    Norbert
This discussion has been closed.