Forum > LazReport
Error printing to zebra printer [SOLVED]
magleft:
Hi everyone.
The problem I'm having is that when I try to print to a zebra printer I get the following error:
Invalid floating point operation.
Pres OK to ignore end risk data corruption.
Press Abort to cancel the program.
When I run the app on a computer that doesn't have the zebra printer connected everything works fine.
The code who call the report is here
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- frReport2.LoadFromFile(ExtractFilePath(Application.ExeName)+'Reports\Arithmisi.lrf'); frReport2.ShowReport ;
Note that the printer prints on labels.
Also an older version of the program worked fine.
Does anyone have any idea what the problem is and how it can be fixed?
Thanks in advance for any help..
Blacha:
Hi. :)
I suggest the following solution, which works for me (Zebra ZC100) - export the labels to BMP format in LazReport and send this format to Zebra. Although you will have each label in a separate file, then you will not have problems with printing on Zebra.
magleft:
First of all I would like to thank you for your reply.
My problem is that each label is different as numbering is printed.
In the previous version of the application the labels were printed normally.
I will try by "teasing" various parameters of the form.
If it works, I'll let you know.
Blacha:
That's right. My code generates BMP files and each with different content according to the query database content. I had to spend some time determining the report page size. The only thing I need to work on is the resolution of the generated BMPs (only 3dpi), but for the purposes of printing black text, this is completely sufficient. The main question - is the preview of your report displayed correctly?
rvk:
--- Quote from: Blacha on October 10, 2024, 08:58:12 pm ---That's right. My code generates BMP files and each with different content according to the query database content.
--- End quote ---
Isn't that much slower. Especially if each label is different.
(I once even programmed that for multiple labels, just one label is sent with command to print multiple. Sending each label was much slower, even woth text.)
@magleft Does the report also crash during printing if you print to a normal printer (just to know if it's useful to test this, because I don't have a Zebra myself.)
Navigation
[0] Message Index
[#] Next page