Microsoft Report Builder does not print report cor

2019-09-02 02:07发布

问题:

I build a report that is showing TOP 4 items in a table. I want to be able to print the report on a Zebra LP2844 label printer. The label is 6x4 landscape. I set the PageSize width to 6in and the Height to 4in. Each Margin is set to 0.1in. The Body width is set to 5.8in (6in-0.1in-0.1in). I run the report through the report builder and take a look at the Page Setup and Portrait is selected. So I select Landscape and confirm with OK. If I take a look again it is set back to Portrait. The Label print however it wants. I get it either to print landscape but everything is way smaller (only using the upper left thrid of the label) or it is the right size but portrait and so it is cut off.

Another issue is the barcode that im trying to print. I'm using font C39P12DmTt. I can see it in the ran report but it does not print.

How do i fix the report?

I'm using SQL2008 and Report Builder 3.0

Thanks,

回答1:

I can't answer the question about your actual problems with Report Builder, but I can tell you something about Zebra LP2844 printers in general:

I'm dealing a lot with Zebra LP2844 printers at work, and I had nothing but trouble every time I tried to print via Windows printer driver from some report generator (MS Access, mostly).
Most of the time the problems were related to the label format and size (Landscape instead of Portrait, one report split to multiple physical labels...), which sounds similar to the problems you are having.

Zebra printers have a built-in language called EPL (or ZPL, depending on the model) which you can use to send commands directly to the printer.
Creating the labels in EPL/ZPL is not as comfortable as dragging and dropping stuff in a report designer, but the printing is reliable, just works and has never failed me in all the years (we are printing hundreds of labels per day, for nearly 10 years now).

I'm afraid that creating the EPL/ZPL code is not directly possible with SQL Server, but you can do it with C# or any other programming language.
Here is a great blog post about how to print labels to Zebra LP2844 printers with C#:
Sending Raw EPL2 Directly to a Zebra LP2844 via C#

TL;DR:
I know that you are trying to generate the report directly with SQL Server's Report Builder now, but I would advise you to generate EPL/ZPL code and send it directly to the printers, if possible.
It will save you a lot of pain in the long run, believe me!