Sub avvia_stampa_documento_su_stampante_predefinita(id_doc_tes As String, nome_file_comandi As String)As Long
Dim jasper As JasperReports
Dim report As JasperReport
Dim print As JasperPrint
Dim conn As JasperConnection
Dim selPrinter As String
Dim P As Printer = Printer_Static.GetDefaultPrinter
selPrinter=P.GetName
jasper.InitializeParameters
jasper.AddParameter("id_doc_tes",id_doc_tes)
report = jasper.CompileXML(File.Combine("C:\PUBLIC\ERP2\Sqlite_Data", "erp2_sqlite_impegno.jrxml"))
conn = jasper.getConnectionSQLite(File.Combine("C:\PUBLIC\ERP2\Sqlite_Data", "ERP2_SQLITE_PRINT.db"))
print = jasper.Print(report, jasper.parameters, conn)