How to print copyright on every page of a report ?

Stimulsoft Reports.NET discussion
Post Reply
mgorgin
Posts: 27
Joined: Wed Jun 18, 2008 2:06 am

How to print copyright on every page of a report ?

Post 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.

Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to print copyright on every page of a report ?

Post 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.
mgorgin
Posts: 27
Joined: Wed Jun 18, 2008 2:06 am

How to print copyright on every page of a report ?

Post by mgorgin »

Thank for info.

It working but place text on center of page.

may be align bottom or customize place?

Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to print copyright on every page of a report ?

Post 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.
mgorgin
Posts: 27
Joined: Wed Jun 18, 2008 2:06 am

How to print copyright on every page of a report ?

Post by mgorgin »

Thank for guideline to do this.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to print copyright on every page of a report ?

Post by Edward »

Please let us know if any help is required.

Thank you.
Post Reply