Patch level : 10.0
Files correlati : ve1 Ricompilazione Demo : [ ] Commento : Aggiunto supporto per stampa diretta senza dialogo di impostazione stampante git-svn-id: svn://10.65.10.50/trunk@19842 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
975eb6f92f
commit
e3f9caef19
@ -935,6 +935,7 @@ class TReport_doc_app : public TSkeleton_application
|
|||||||
TString16 _codnum; // codice numerazione / profilo
|
TString16 _codnum; // codice numerazione / profilo
|
||||||
long _ndoc, _codcf;
|
long _ndoc, _codcf;
|
||||||
char _tipocf;
|
char _tipocf;
|
||||||
|
bool _no_print_dlg;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void add_data_filter(TString& query, bool from) const;
|
void add_data_filter(TString& query, bool from) const;
|
||||||
@ -1230,7 +1231,12 @@ bool TReport_doc_app::print_loop(TRecordset& doc, TOutput_mode mode, bool is_def
|
|||||||
xvt_sys_goto_url(pdf, "open");
|
xvt_sys_goto_url(pdf, "open");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default: book.print(); break;
|
default:
|
||||||
|
if (_no_print_dlg)
|
||||||
|
book.print(1, book.pages()); // Evita di chiedere da pag. a pag.
|
||||||
|
else
|
||||||
|
book.print();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1272,8 +1278,9 @@ void TReport_doc_app::print_selection(TOutput_mode mode)
|
|||||||
|
|
||||||
// Elabora una transazione del tipo
|
// Elabora una transazione del tipo
|
||||||
// [Transaction]
|
// [Transaction]
|
||||||
// Action = Print
|
// Action = Stampa
|
||||||
// Mode = D
|
// Mode = D
|
||||||
|
// NoPrintDlg = X
|
||||||
// [33]
|
// [33]
|
||||||
// Doc(0)=D|2009|F01|1
|
// Doc(0)=D|2009|F01|1
|
||||||
// Doc(1)=D|2009|A02|2
|
// Doc(1)=D|2009|A02|2
|
||||||
@ -1282,12 +1289,13 @@ void TReport_doc_app::print_trans(const char* ininame)
|
|||||||
TTrans_recordset doc(ininame);
|
TTrans_recordset doc(ininame);
|
||||||
if (doc.items() > 0)
|
if (doc.items() > 0)
|
||||||
{
|
{
|
||||||
char a='P', m='D';
|
char a='S', m='P';
|
||||||
if (ininame && *ininame) // Dummy test
|
if (ininame && *ininame) // Dummy test
|
||||||
{
|
{
|
||||||
TConfig ini(ininame, "Transaction");
|
TConfig ini(ininame, "Transaction");
|
||||||
a = ini.get("Action")[0];
|
a = ini.get("Action")[0]; // Stampa, Anteprima, Pdf, ...
|
||||||
m = ini.get("Mode")[0];
|
m = ini.get("Mode")[0]; // Definitivo o Provvisori
|
||||||
|
_no_print_dlg = ini.get_bool("NoPrintDlg");
|
||||||
}
|
}
|
||||||
const TOutput_mode mode = key2mode(a);
|
const TOutput_mode mode = key2mode(a);
|
||||||
const bool is_definitive = m == 'D';
|
const bool is_definitive = m == 'D';
|
||||||
@ -1297,7 +1305,7 @@ void TReport_doc_app::print_trans(const char* ininame)
|
|||||||
cantread_box(ininame);
|
cantread_box(ininame);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Allah!!
|
// Traduce un carattere ASCII nella corrispondente modalita' di stampa
|
||||||
TReport_doc_app::TOutput_mode TReport_doc_app::key2mode(KEY k) const
|
TReport_doc_app::TOutput_mode TReport_doc_app::key2mode(KEY k) const
|
||||||
{
|
{
|
||||||
TOutput_mode mode = out_print;
|
TOutput_mode mode = out_print;
|
||||||
@ -1322,8 +1330,8 @@ TReport_doc_app::TOutput_mode TReport_doc_app::key2mode(KEY k) const
|
|||||||
|
|
||||||
void TReport_doc_app::main_loop()
|
void TReport_doc_app::main_loop()
|
||||||
{
|
{
|
||||||
|
_no_print_dlg = false;
|
||||||
const int a = argc();
|
const int a = argc();
|
||||||
|
|
||||||
if (a > 2)
|
if (a > 2)
|
||||||
{
|
{
|
||||||
const TFixed_string arg = argv(2);
|
const TFixed_string arg = argv(2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user