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

Events fires double.

edited March 2003 in General
RB 5.56
in RAP, Detail band events (Beforeprint, afterprint, beforegenerate, after
generate) triggers two times for the last row in the page. If the row cannot
fit in the page the row printed to next page but the triggers fired for both
page 1 and page 2 .
Any idea?

thanks.

Comments

  • edited March 2003
    These events are firing correctly. They fire frequently in order to ensure
    correct pagination throughout the report. If you would like to make
    calculations, be sure to use the TppVariable.OnCalc event.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2003
    I use a TStringList to store values in Id=value format. I must do this for
    some special calculations in Subreport.
    What do you suggest?
    how can I know, whether this condition occurs?


  • edited March 2003
    Huseyin,

    Try setting the TStringList.Duplicate property to DupIgnore. This way you
    will not recieve duplicate enteries in your StringList when you add strings.
    Be sure to use the TppVariable.OnCalc event for all calculations. If this
    does not help, please provide more information on what you are trying to
    accomplish.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2003
    I have a report :
    Grouped by in that way
    --> termid
    |--> storeno
    |--> groupid
    |--> groupid1
    group1name sum(constotal)
    |--> groupid2,
    |--> ArticleNo.
    artname constotal


    The report contains a subreport in the Termid group header.
    Groupid1 - Group1Name - Group1ConsTotal

    What I want todo is:
    in the main report I want to store groupid1 values in a stringlist by
    termid and group1id.
    In the form of -> Termid,Group1id=sum(constotal)
    I tried to calculate it in the detail band events. But it didn't work,
    because the events occurs 2 times for the last row in the page. I couldn't
    find a way to understand whether the line printed to page or next page.

    I think it is not possible to do that using Tppvariable.

    The report file is attached. (RB 5.56 - Delphi5)











  • edited March 2003
    Huseyin,

    Please do not post attachments to the news group. I tried your demo and was
    unable to load it. Please simplify your example and send it to
    support@digital-metaphors.com.

    --
    Best Regards,

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