Page 1 of 1

How to print copyright on every page of a report ?

Posted: Tue Jun 24, 2008 4:42 am
by mgorgin
Hello.

Don't print copyright at print time on page of report.

In th user manual illustrate "How to print copyright on every page of a report ?"

I following the manual and show copyright at print preview and designer , but don't print and don't show on pdf.

How do I do?

Thank.


How to print copyright on every page of a report ?

Posted: Wed Jun 25, 2008 5:18 pm
by Edward
Hello.

Yes, it is true. The results of the mentioned code could be seen only in preview on the screen. If you want have that test printed and in the exported document, then you can use Watermark property of the page for that.

Here is the code for assigning of the Watermark property to the Compiled report:

Code: Select all

if (!report.IsCompiled) report.Compile();
foreach (StiPage page in report.CompiledReport.Pages)
{
        page.Rendering += new EventHandler(Page_Rendering);
}
report.Show();

void Page_Rendering(object sender, EventArgs e)
{
    StiPage page = sender as StiPage;
    page.Watermark.Text = "MyCompany";
    page.Watermark.Angle = 0;
}
Thank you.

How to print copyright on every page of a report ?

Posted: Thu Jun 26, 2008 1:29 am
by mgorgin
Thank for info.

It working but place text on center of page.

may be align bottom or customize place?


How to print copyright on every page of a report ?

Posted: Thu Jun 26, 2008 6:17 am
by Edward
In that case you need to add a text dynamically into the specified page. That could be done in the BeforePrintEvent of each page after compilation, as in the example above.

Thank you.

How to print copyright on every page of a report ?

Posted: Sat Jun 28, 2008 2:40 am
by mgorgin
Thank for guideline to do this.

How to print copyright on every page of a report ?

Posted: Mon Jun 30, 2008 2:41 am
by Edward
Please let us know if any help is required.

Thank you.