Set watermark text thru code?

edited January 2011 in FastReport .NET
i am having a hard time finding how to set the watermark text thru the code. the only way i can do it is in the report designer. but i need the text to be set at runtime.

anyone know how to do this?

edit: i know it can be done since i can create a watermark object in the code
Dim w As New FastReport.Watermark()
w.text = "watermark text"

but i cant find anything at all within the report object (FastReport.Report object) to set the watermark

thanks!

edit2: i have found the solution and wanted to share it:
            Dim w As New FastReport.Watermark()
            w.Enabled = True
            w.Text = "Test Watermark text"
            w.TextRotation = WatermarkTextRotation.ForwardDiagonal
            CType(Me.Report1.Pages.Item(0), FastReport.ReportPage).Watermark = w

that will set my report's page1 watermark.

key thing i realized:

"Me.Report1.Pages.Item(0)"

is not the same class as

"FastReport.ReportPage"

BUT it seems that "FastReport.ReportPage" inherits from the "FastReport.PageBase" object

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.