Groupwise Pagecount is not working perfectly

edited June 2001 in General
Hi
In a report I need something to print on my Last page of a GROUPS.
So I gave the condition

if Report.Group[0].Pageno = Report.Group[0].pagecount then
begin
// -- Conditions for print
end;
But Report.Group[0].pagecount always return 1 and some time -1.
Any body can give me a solution for this.

Thank you

Ajit


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.250 / Virus Database: 123 - Release Date: 4/18/01

Comments

  • edited June 2001

    1. Consider using a GroupFooter - it prints on the last page of a group.

    2. If want to print something in the Group Header that indicates the
    last page for a group then try something like this.

    a. create a Label in the group header with a caption of 'Last Page for
    Group'.
    b. In the Label.OnPrint event code

    if Report.SecondPass then
    Label3.Visible := Report.Groups[0].PageNo =
    Report.Groups[0].PageCount
    else
    Label3.Visible := False;





    Best regards,

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