Errors when printing to Shared printers from AR11

Posted by: raleigh on 15 January 2018, 3:22 pm EST

    • Post Options:
    • Link

    Posted 15 January 2018, 3:22 pm EST

    Using ActiveReports 11.1 from VisualStudio 2013.

    I attached screenshots of 2 messages received when attempting to print a report to a printer that has been ‘Shared’ on different computer. The only time an error is raised is when printing via ActiveReports. No problem printing test page or printing from other apps. These errors were produced from 2 different computers, attempting to print to 2 different printers. Both origin computers have correct drivers installed for the target printer. Can also directly connect the printers to the computers and print with no issue.

  • Posted 16 January 2018, 12:55 am EST

    Hello,

    It appears that the paper size is set to something other than the printer default, which when moved to a client computer (with a different printer and different paper size) can cause this issue. You have to set the paper size to the printer default before deploying it to clients.

    Thanks,

    Mohit

  • Posted 16 January 2018, 2:18 pm EST

    Please clarify what is meant by “…set paper size to printer default before deploying it to clients…” To which object should this be applied? And if the report is not using the printer’s default paper size…what then?

    Thanks.

  • Posted 17 January 2018, 3:17 am EST

    Hello,

    Sorry for the confusion.

    You need to set to set the paper size to the printer default. Please set the “DefaultPaperSize” property of section report to ‘True’. Please use the following line of code:

    rpt.PageSettings.DefaultPaperSize = True

    if the report is not using the printer’s default paper size…what then?

    “Failed to add the custom size …” error occurs when the paper size set in Section report does not support by the installed printer. So, you need to set the paper size of section report which is supported by installed printer at your end.

    Hope it clears.

    Thanks,

    Mohit

  • Posted 17 January 2018, 4:16 pm EST

    Thank you for the clarification. Which leads me to the following question:

    If, within the report, I set only the rpt.PageSettings.PaperWidth value…and no other rpt.PageSettings properties…How is ActiveReports determining and setting the PaperSize to be used when sending rpt to the Printer? I took it that the PaperSize in these instances would be whatever PaperSize value is currently set/selected in the Printer’s Settings( via Devices and Printers… )? If that is not the case…then how do I ensure that my rpt will always use a desired, specific PaperSize?

    just FYI: we have reports that print on receipt printers where the paper width is typically either 3 inches or 2 inches. These printers use continuous roll paper. The continuous roll thing is not an issue. But, what we are experiencing is that the text of the report( =receipt ) is not always positioned using the same width left margin. So…sometimes the left-most text will get cut off. And sometimes the right-most text will get cutoff. The report just does not print the same on different printers that are in use at multiple locations. So, i am very curious as to whether ActiveReports is using PaperSize other than the value in the Printer’s Settings.

    Thank you.

  • Posted 18 January 2018, 6:05 am EST

    Hello,

    In my opinion, you need to use “PrintWidth” of the report instead of "PageSettings.PaperWidth " property. When you set the "PaperWidth " property, it will change the paper size to the custom size which may be not supported by the installed printer. “PrintWidth” forces the report to print only in the specified width irrespective of paper size. As I said earlier, you need to set the paper size to the printer default to print the report through the different printers as all printers support different sizes.

    Also, you need to take care of printer margins to make sure that report will not get cut off.

    Thanks,

    Mohit

  • Posted 18 January 2018, 11:43 am EST

    Thank you Mohit! Everything is falling into place after applying your suggestions.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels