.NET Framework Developer Center > .NET Development Forums > POS for .NET > Printing an DevExpress Report using an OPOS Printer
Ask a questionAsk a question
 

AnswerPrinting an DevExpress Report using an OPOS Printer

  • Monday, November 02, 2009 8:36 AMMythica Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Good Morning Everyone,

    I have been struggling for a few days now, trying to print an DevExppress report to an OPOS printer using the Microsoft Point of Service component.

    Does anyone know if it is possible to do so, and if so has a code sample that I can have a look at or a few hints on how this could be done?

    Thanks in advance.


Answers

  • Monday, November 02, 2009 7:34 PMYortAnswererUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi,

    I'm not familiar with DevExpress so I may be wrong, but it's likely this can't be done... at least not via Pos .Net (or OPOS). Somebody else previously asked in this forum how to do this wither another reporting system (ActiveReports?) and the answer was pretty much that the two just don't work together.

    Most reporting solutions are designed to work with the Windows print sub-system, which is very different from the UPOS specification, and so the two are incompatible.

    The only way I can think of making this work would be to find out if DevExpress supports some kind of plug-in for handling report output, and then writing your own DevExpress add-in that would take the DevExpress report and convert it to OPOS/Pos .Net commands.

    Failing that, don't use OPOS or Pos .Net... just get a Windows printer driver for the printer and print to it via the Windows print sub-system like any other printer. Many manufacturers (Epson, TPG, Samsumg etc) provide Windows printer drivers for their thermal printers, and if you can't get one for your printer you can always try the Generic / Text Only printer that ships as part of Windows. Of course, that will only work with thermal printers, it won't work for slip printers that require complex control over form placement (insertion/removal etc).

    If you really want to you Pos .Net / OPOS, then don't use a report system. Create your own print-markup-language which can be used to layout your reports, receipts etc. and sent to any OPOS device, but parsing the language and outputting it through the OPOS / Pos .Net objects. I have a blog post about this in theory here;

    http://www.yortondotnet.com/2009/07/better-way-to-print-receipts.html


    • Marked As Answer byMythica Tuesday, November 03, 2009 6:29 AM
    •  

All Replies

  • Monday, November 02, 2009 7:34 PMYortAnswererUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi,

    I'm not familiar with DevExpress so I may be wrong, but it's likely this can't be done... at least not via Pos .Net (or OPOS). Somebody else previously asked in this forum how to do this wither another reporting system (ActiveReports?) and the answer was pretty much that the two just don't work together.

    Most reporting solutions are designed to work with the Windows print sub-system, which is very different from the UPOS specification, and so the two are incompatible.

    The only way I can think of making this work would be to find out if DevExpress supports some kind of plug-in for handling report output, and then writing your own DevExpress add-in that would take the DevExpress report and convert it to OPOS/Pos .Net commands.

    Failing that, don't use OPOS or Pos .Net... just get a Windows printer driver for the printer and print to it via the Windows print sub-system like any other printer. Many manufacturers (Epson, TPG, Samsumg etc) provide Windows printer drivers for their thermal printers, and if you can't get one for your printer you can always try the Generic / Text Only printer that ships as part of Windows. Of course, that will only work with thermal printers, it won't work for slip printers that require complex control over form placement (insertion/removal etc).

    If you really want to you Pos .Net / OPOS, then don't use a report system. Create your own print-markup-language which can be used to layout your reports, receipts etc. and sent to any OPOS device, but parsing the language and outputting it through the OPOS / Pos .Net objects. I have a blog post about this in theory here;

    http://www.yortondotnet.com/2009/07/better-way-to-print-receipts.html


    • Marked As Answer byMythica Tuesday, November 03, 2009 6:29 AM
    •  
  • Tuesday, November 03, 2009 6:29 AMMythica Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Yort,

    Thanks for the detailed responce. I will use the print-markup-language root, that should do the trick.

    The link that you posted is quite helpful as well.

    Thanks again.