Strange behaviour when printing an MRT file
Posted: Fri May 14, 2010 8:52 am
Hi,
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
With the print dialog, print to a physical printer. I've tested with a HP and others and the same issue occurs.
Now repeat the same process again but comment out the following line
The output should print correctly this time without the position shifting occuring if you compare the two paper outputs on top of one another.
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?
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?