Set watermark text thru code?
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
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:
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
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