New Blog Post: PDF/A and Metadata

Line Numbering

edited June 2001 in General
I am trying to number the lines in a report with the line numbers showing on
the detail and the group bands. I have tried using a TppVariable and
incrementing the value in the OnCalc and the OnGetText events. When I use
the OnCalc event the value is incremented twice (not what I wanted). When I
use the OnGetText event, some line numbers are skipped between pages because
the group at the bottom of the page doesn't fit, so it gets new numbers when
it prints at the top of the next page. With both methods, the line numbers
keep getting higher in print preview when I page backward and forward.

Also, the report has three sections, and the line numbers must continue
incrementing and not reset with the start of each section.

Thanks for your help.

Comments

  • edited June 2001
    Hello,

    did you looked at DbCalc. This have a calculation property for lines. i
    using it in details and it works fine.
    chris
  • edited June 2001
    Maybe I'm missing something, but DBCalc doesn't have a calculation type for
    lines. I saw in the Developer's Guide that you can use DBCalc to count the
    detail records and report the value as a line number, but I need to have a
    line number on the group break as well.

    Also, each section (I have three) is attached to a different pipe. The line
    number should not be reset when proceeding to the next pipe.

  • edited June 2001
    hi,

    there is a property onright mouse with caclulation.... In this combo you can
    sum, avarage, minimum, maximum and you have a linecounter.

    chris
  • edited June 2001
    Actually, the option is Count. This counts the number of records in the
    pipe and not the lines on a page. This works to some extent, in that it
    numbers the detail lines. However, additional programming is required to
    accurately number the total line. In addition, more programming is required
    to synchronize the numbering of the proceeding sections with the numbering
    from the first section.

  • edited June 2001
    The TppVariable should only fire its OnCalc event once. Use one variable in
    the detail band. It will fire once for every traversal. Now, place another
    variable in the group footer band. In its OnCalc event handler, increment
    the value of the variable in the detail band. You'll need to use the timing
    dialog to set the group footer band variable to fire only when the group
    footer prints (GroupBeforeFooter in the dialog).

    Set Report.CachePages to true, and the pages that have been generated will
    be saved when traversing through the pages in the preview.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.