Page Size on Receipt Printer
I'm printing to a receipt printer. ...It seems that I need to set the page size and I can't find a way to make it dynamic. Does anybody know how to do this?
So, if the page is set to 10" height and there is only 1 line in the databand, then I have a ton of white space before the footer prints....to make up the 10"....
Any help would be appreciated.
So, if the page is set to 10" height and there is only 1 line in the databand, then I have a ton of white space before the footer prints....to make up the 10"....
Any help would be appreciated.
Comments
The solution is to set the paper height dynamically in the script. See the attached report, it can be run from Demo.exe.
Thanks for this....I think it will get me on the right path, however....it seems that in your code, reportHeight, isn't holding a value. I made sure the event afterlayout is called....but when the code:
private void Page1_StartPage(object sender, EventArgs e)
{
if (Engine.FinalPass)
{
Page1.PaperHeight = (reportHeight + PageFooter1.Height + 1) / Units.Inches +
Page1.TopMargin + Page1.BottomMargin;
}
}
is called, it seems that reportHeight doesn't have a value. I've tried even creating another sub specific to the Data1 after layout event...and still it doesn't have a value.
Any thoughts?
I decided to also upload my report file....you won't have the datasource, but maybe you can see something I don't.
Thanks,
Craig
Have you had a chance to look at this?
Thanks,
Craig
You should attach the Data2.AfterLayout event to the ReportTitle1_AfterLayout handler. Also correct the code:
(the page.PaperWidth and PaperHeight are always measured in millimeters).
I'm so mad! I spent 30+ hours on this and these few changes did it...sometimes it's the minor changes! Thanks again!!! Looks like everything is working now!