I've come across some strange behaviour when printing an mrt file after the SaveDocument method is called.
The print output to paper seems to be pushed slightly more to the right and down from the top left position of the page.
Here are some basic steps to reproduce the issue:
Load the attached MRT file from code. It is just a standard A4 template with one line of text.
Load the mrt file, save it as an mdc document to the local disk and then call print on the mrt file
Code: Select all
StiReport report = new StiReport();
report.Load(@"S:\A4Template.mrt");
report.Info.Zoom = 1.0d;
if (!report.IsRendered)
{
report.Render(false);
}
//Save report to mdc file
report.SaveDocument(@"S:\A4Document.mdc");
report.Print(true);
Now repeat the same process again but comment out the following line
Code: Select all
//Save report to mdc file
//report.SaveDocument(@"S:\A4Document.mdc");
I've tested the code using 2006.4, 2009.3 and 2010.1 and I experience the same issue using all versions.
Am I missing something simple?