This is a migrated thread and some comments may be shown as answers.

Printing report on label printer, wrong orientation

17 Answers 1189 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Erik
Top achievements
Rank 1
Erik asked on 07 Feb 2014, 07:25 PM
Hello,

I'm trying to print a report directly to a Epson TM-C3500 label printer. My report has a size of 50mm (width) x 100mm (height) in portrait orientation. 
On the paper-roll the label is 106mm (width) x 51mm (height). So the report has to be printed in landscape mode.

But this seems not to work. The report is always printed in portrait orientation and so it does not fit on the physical label. In the properties of the printer the landscape orientation is selected.

When I first export the report to PDF and print it via the PDF reader, it works perfectly. But the label printing takes place at a point of sale, so it has to work automatically and the way via pdf is not an option.

Any ideas where I can tweak the direct printing process? I wish to use ReportProcessor.PrintReport in the end.

Thanks
Erik

17 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 11 Feb 2014, 07:38 PM
Hi Erik,

I believe you discuss this issue with my colleague in your support ticket on the same topic.

For anyone concerned this is a quote from the ticket:
"....Currently we are not quite sure why there is a problem with the printer, but most probably it is related to its drivers as the report engine applies the PageSettings to the document and sends it to the printer using the standard .NET printing capabilities, where it is the printer that handles the operation.

A possible work around is to render the report to XPS format using the ReportProcessor.ReportMethod and then print it programmatically as described in the How to: Programmatically Print XPS Files article.....
"

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

0
fieb2
Top achievements
Rank 1
answered on 25 Jun 2014, 07:42 AM
Hi, 

It used to work fine with version 7.1.13.612. That one uses framework 3.5. Now we upgraded to Version 8 which uses framework 4 and it does not print as expected anymore (same PC, same printer, same settings). I’m not sure if it does not work anymore because of Telerik or MIcrosoft.....

Somehow the  PageSize.Custom does not seem to be working anymore. We tried all possible combinations but  no result with version 8. 

I'll send picture and code later today

0
Stef
Telerik team
answered on 27 Jun 2014, 12:57 PM
Hello fieb2,

The suggested workaround is the old implementation of the printing functionality of the WPF report viewer. However, there are some problems when printing report books with different page orientations using this approach so it was changed to have consistent printing of report documents with all standard printer machines.

Our current implementation for the printing functionality always sets Landscape to true when the width of the page is larger than the height and vice versa, which works with regular printers. Our suspicion is that Zebra printers additionally rotate the image according to their own settings.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
fieb2
Top achievements
Rank 1
answered on 27 Jun 2014, 01:27 PM
Hello Stef,

"Our current implementation for the printing functionality always sets Landscape to true when the width of the page is larger than the height and vice versa"

I downloaded the source code for the telerik reporting. Where can I find this functionality? I want to disable it and see if it works then.

Because setting the page orientation in Windows->Printer Settings is ignored by the printer (I guess because it is not a "regular printer" :( . I also tried creating a "form" in the Control panel->Printer->Print Server Properties (this pretty much always did the trick with Crystal reports) , but that does not work either.

As I mentioned, with telerik reporting V7 the printer works just fine..

Thank you

Regards

Stephan
0
Heinrich
Top achievements
Rank 1
answered on 29 Jun 2014, 07:58 AM
Hi,

I have the same problem. I need to print to an Epson LX-350 with tractor feed.
My physical pages are 210mm wide and 100mm high. I designed a Report with page settings set to Custom, 210mm X 100mm, Orientation Portrait.

I dont understand the logic of changing the Orientation when I print.

PS I think the method where this happens is
Telerik.Reporting.ImageRendering.MetafileDocument.GetPageSettings

I wish there is a way to make it print the way I set it up

Heinrich

0
fieb2
Top achievements
Rank 1
answered on 29 Jun 2014, 09:38 AM
Hello Heinrich,

Looking at the code in GetPageSettings, it looks like you are right, but I compared this method with V7 and it is the same in V7 (and with V7 it works for me)

Unfortunately the printer is in the customers office so I can't test it now. I'll remove the logic and try it on Monday and let you know the result.

​   var paperWidth = Unit.Mm(Math.Min(pageSize.Width, pageSize.Height));
   var paperHeight = Unit.Mm(Math.Max(pageSize.Width, pageSize.Height));   
...
   {
    ....
    Landscape = pageSize.Width > pageSize.Height,
   };
0
John Slocum
Top achievements
Rank 1
answered on 17 Jul 2014, 04:23 PM
I'm having the same issue.  We provide an application that supports printing inventory labels on many different sized labels.  Since the last time we upgraded, many of those users get an incorrect orientation whenever the width of the label is greater than the height.

The assumption that the width can't be wider than the height and still be a Portrait orientation seems incorrect to me.   There are many label styles and label printers that want to print Portrait on labels that are wider than they are tall.

Will you consider changing this back to the way it worked before, or at least providing us with the option for you to not change the specific orientation we have set.
0
Erik
Top achievements
Rank 1
answered on 17 Jul 2014, 04:45 PM
This is a quote from the answer to my support ticket from Feb 11,2014:

This statement is there to provide for the correct printing on standard printers. If removed, there will be issues when printing on most standard image printers.

However, we will discuss this with our developers and see if we can implement it in such way so it is suitable for both standard and label formats.


Seems, that there is no improvement till today.

Erik



0
Erik
Top achievements
Rank 1
answered on 17 Jul 2014, 04:52 PM
Btw, my workaround is still exporting to xps and then printing this xps-document. This works in any orientation combination.
0
Martin
Top achievements
Rank 1
answered on 21 Jul 2014, 07:48 PM
"Our current implementation for the printing functionality always sets Landscape to true when the width of the page is larger than the height and vice versa, which works with regular printers. Our suspicion is that Zebra printers additionally rotate the image according to their own settings."

False, I'm having trouble with a few references on regular printers. Using Telerik Reporting for Windows Forms version 7.2.14.127.

Any way to workaround this?
0
Stef
Telerik team
answered on 24 Jul 2014, 10:36 AM
Hi Mark,

The reason some printers rotate the sent document additionally is in their driver settings. Most of the standard printers work as expected with the given settings; unless their driver settings cause deviation in that default behavior.  Please test the suggestion from my post in this forum thread:

"...A possible work around is to render the report to XPS format using the ReportProcessor.ReportMethod and then print it programmatically as described in the How to: Programmatically Print XPS Files article....."

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
MN
Top achievements
Rank 1
answered on 05 Aug 2014, 09:52 PM
I was using Q2, 2012. Once I updated my project to Q3, 2013, I am having this same issue: labels are printing with wrong orientation. Will this issue ever be resolved in upcoming update?
0
Stef
Telerik team
answered on 06 Aug 2014, 08:09 AM
Hello everyone,

Please download and test the latest available Telerik Reporting Q2 2014 SP1 version 8.1.14.804, where we included modifications in the print mechanism for WPF and WinForms ReportViewer controls.

We will appreciate it if you let us know if the changes help you to resolve the issue with printing from zebra printers.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Martin
Top achievements
Rank 1
answered on 31 Aug 2014, 07:38 PM
What if my license is expired? Are you releasing a hotfix or do I need to downgrade? What's the version I need to go back to?
0
Stef
Telerik team
answered on 02 Sep 2014, 01:30 PM
Hi Martin,

You can test Telerik Reporting Q2 2012 SP1 version 6.1.12.820, which can be downloaded after logging into your account and navigating to Products & Subscriptions - DevCraft Complete - Download - Reporting - Older versions.

You can also contact our sales team to get more details about the options for obtaining Telerik Reporting Q2 2014 SP1 version 8.1.14.804, which contains all changes in the viewers between 2012 and 2014, and the update for printing on Zebra printers.

I will forward your inquiry to your account manager in case you want to get in touch with our Sales representatives.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Martin
Top achievements
Rank 1
answered on 02 Sep 2014, 07:30 PM
Hi Stef,

I tried downgrading but it didn't work on VS2013 and I got a lot of errors when rendering the report on a WPF application (DataBinding errors).

The main error I got was when trying to bind a table to an ObjectDataSource, the method won't get called and the table events won't fire as well. Then, on the rendered report I got a message saying that the property X (the name of the property of the object) did not exist in the current context.

I think I'll try the XPS solution as upgrading to Q2 2014 SP1 is not an option right now.

Regards
0
Stef
Telerik team
answered on 04 Sep 2014, 02:22 PM
Hi Martin,

Visual Studio 2013 support is added as of Telerik Reporting Q3 2013. About the events, if the data item's DataSource property is set the NeedDataSource event will not fire.

Also there are changes in the reporting engine that should be handled manually on downgrade. For example check the obsolete properties and namespaces in Telerik Reporting Q1 2013. You will need to go through the release notes of each release between your version and Q2 2012 SP1, and check manually the settings of your reports.


The described approach with XPS is also suitable and gives you full control over the printed document.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Erik
Top achievements
Rank 1
Answers by
Stef
Telerik team
fieb2
Top achievements
Rank 1
Heinrich
Top achievements
Rank 1
John Slocum
Top achievements
Rank 1
Erik
Top achievements
Rank 1
Martin
Top achievements
Rank 1
MN
Top achievements
Rank 1
Share this question
or