Backpicture
I want to insert a backpicture on my report. I can't find a topic in the user's manual or the programmers manual.
I would like instructions both for the designer and for manipulating a backpicture in code (I use C#, but any .Net language is fine).
Thanks in advance,
I would like instructions both for the designer and for manipulating a backpicture in code (I use C#, but any .Net language is fine).
Thanks in advance,
Comments
Select the page object
Find the Watermark property (at the bottom)
Click it once to show a button with three dots
Press the button
Select the second tabpage
Load an image
So I have to look for the watermark property in code, but no luck in that:
This works:
FastReport.PageBase pageRecept = (FastReport.PageBase)rptRecept.FindObject("Page1");
the pageRecept object (a PageBase object), doesn't have a property watermark, so I have to search further, but all these options don't work:
FastReport.Watermark pageWatermark = (FastReport.Watermark)pageRecept.Page.FindObject("Watermark");
The topic of his question is 8661 and he found:
Watermark watermark = new Watermark();
watermark.Enabled = true;
watermark.Text = "Demo Version";
ReportPage page = reportObject.Pages.OfType<ReportPage>().First();
page.Watermark = watermark;
I had to adjust a little:
FastReport.ReportPage pageRecept = (FastReport.ReportPage)rptRecept.FindObject("Page1");
FastReport.Watermark watermark = new FastReport.Watermark();
watermark.Enabled = true;
watermark.Image = Image.FromFile(@c:\myfiles\diagram.gif);
pageRecept.Watermark = watermark;
Thanks Saeed for finding the solution to your own question and sharing it with the world!