First , WM21 - android don't have report like in WD .
depend on whether you want to print on receipt printer or A4 size paper on normal printer .
1) if you print to receipt printer the use ESC/POS script . it will work on epson printer and most receipt printer (other brands).
once you open the port (whether through usb / network) just write the string (ESC/POS
script) to the printer buffer.
2) if you want print normal A4 size paper to normal printer . then it will be a bit complicate.
- using report service (web based) -
depend on the DB
- HFSQL use webdev
- SQL SERVER use SSRS
- for others DB use BIRT / Crystal report .
to view report
- using httprequest . to request the report (html) and the output in html control. quality can be variant depend on report viewer . crystal report is almost same as pdf while SSRS and Birt don't show exact number of pages like pdf .
to print report
Method 1 : server print . add printer on server where you host the report server. the report viewer (html) that come with the report server has option "Print" on menu . the printer will show up
Method 2 : use android apps like print share( may need to pay)
depend whether your printer supported . use httprequest to report server . to request pdf version of the report . then use the app to open the pdf .
Method 3 : print through google print
use httprequest to report server . to request pdf version of the report then print by using GglPrintDocument() . if your printer support google print then easy . if not then you need a pc (windows) with chrome installed and connected to printer . then add the printer using chrome.
Method 4 : print using PS (printer must support PS script)
use httprequest to report server . to request pdf version of the report then write it to printer
Method 5 : print using PCL (only for report server that support this format out put)
use httprequest to report server . to request PCL version of the report then write it to printer. most printer support PCL . if you are good with PCL language and able to write the report . then you no need report server.
Conclusion :
Method 1 (print quality good) : is first to try but don't assume the print option will work on your android browser .
---the rest method will be slow since you need to download the report first.---
method 2 (print quality bad): use this only if your printer supported and cannot use google print
method 3 (print quality good) : this the slowest . need a pc runing chrome connected if printer not support google print.
method 4 (print quality best) : so far only those big office printer support such option.
Method 5 (print quality depend) : I not sure how many printer support PCL.
had anyone tried more crazy ideas ?