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

Pagestyle.Visible when using psFirstPage

edited October 2006 in General
Hi,

I have a logo on the PageStyle and want to print it on user request. This
logo should only be printed on the first page so pagestyle.pagesetting =
psFirstPage.

To show the report I use:

var RC : word;
begin
RC := MessageDlg( 'Afdrukken met logo?', mtConfirmation, mbYesNoCancel,
0 );
if (RC = mrYes)
then ppReport1.PageStyle.Visible := True
else ppReport1.PageStyle.Visible := False;
if (RC <> mrCancel)
then ppReport1.Print;
end;

This doesn't seem to work. When using pagesetting = psAll, controlling
Visible works correct.

Regards,
Jeroen R?ttink

Comments

  • edited October 2006
    Hi Jeroen,

    I believe when using the PageSetting property, the visible property is
    automatically set during the report generation. In my testing, setting the
    visibility of the PageStyle in the PageStyle.BeforePrint event when the
    PageSetting was set to SinglePage worked correctly.

    --
    Regards,

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

    Best Regards,

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