Modifying report in code after template is loaded

Stimulsoft Reports.NET discussion
Post Reply
jmiller
Posts: 91
Joined: Mon Sep 20, 2010 12:18 pm

Modifying report in code after template is loaded

Post by jmiller »

I have a report template (mrt) that my program loads with StiReport.Load(). It loads fine and renders fine, until I want to programatically change something like the watermark.
myReport.Load();
// Set the watermark on pages
StiWatermark waterMark = new StiWatermark();
waterMark.Font = myFont;
waterMark.Text = myWatermarkText;
myReport.Pages[0].Watermark = waterMark;
...
myReport.Render();

When it renders, it does not render the watermark. I've done similar things without using an mrt where the report is entirely programatically created. These watermarks work fine.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Modifying report in code after template is loaded

Post by HighAley »

Hello.
jmiller wrote:I have a report template (mrt) that my program loads with StiReport.Load(). It loads fine and renders fine, until I want to programatically change something like the watermark.
myReport.Load();
// Set the watermark on pages
StiWatermark waterMark = new StiWatermark();
waterMark.Font = myFont;
waterMark.Text = myWatermarkText;
myReport.Pages[0].Watermark = waterMark;
...
myReport.Render();

When it renders, it does not render the watermark. I've done similar things without using an mrt where the report is entirely programatically created. These watermarks work fine.
What version do you use?
We couldn't reproduce your issue. Please send us a sample project to reproduce the issue.

Thank you.
Post Reply