Patch level : 2.1 66
Files correlati : stampe report Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/trunk@12178 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c9cbe14868
commit
da591c3a6e
@ -5,6 +5,7 @@
|
||||
#include <colors.h>
|
||||
#include <dongle.h>
|
||||
#include <prefix.h>
|
||||
#include <recarray.h>
|
||||
#include <reprint.h>
|
||||
#include <statbar.h>
|
||||
#include <utility.h>
|
||||
@ -1212,6 +1213,13 @@ bool TAlex_virtual_machine::get_usr_val(const TString& name, TVariant& var) cons
|
||||
var.set(prefix().get_codditta());
|
||||
return true;
|
||||
}
|
||||
if (n == "RAGSOC")
|
||||
{
|
||||
const long code = prefix().get_codditta();
|
||||
const TString& ragsoc = cache().get(LF_NDITTE, code, n);
|
||||
var.set(ragsoc);
|
||||
return true;
|
||||
}
|
||||
if (n == "STUDY")
|
||||
{
|
||||
var.set(firm2dir(-1));
|
||||
|
@ -82,6 +82,7 @@ public:
|
||||
// @cmember Ritorna l'identificatore assegnato al controllo
|
||||
short id() const;
|
||||
WINDOW parent() const;
|
||||
XI_OBJ* xi_object() { return _obj; }
|
||||
|
||||
int type() const;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <xvt.h>
|
||||
//#include <xvt.h>
|
||||
#include <xinclude.h>
|
||||
|
||||
#include <controls.h>
|
||||
#include <browfile.h>
|
||||
@ -746,6 +747,24 @@ void TMask::handler(WINDOW win, EVENT* ep)
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (ep->type == E_VSCROLL)
|
||||
{
|
||||
for (int i = 0; i < fields(); i++)
|
||||
{
|
||||
const TMask_field& ff = fld(i);
|
||||
if (ff._ctl != NULL)
|
||||
{
|
||||
XI_OBJ* obj = ff._ctl->xi_object();
|
||||
if (obj->type == 11)
|
||||
{
|
||||
const int dir = ep->v.scroll.what == SC_LINE_UP ? -3 : +3;
|
||||
xi_scroll(obj, dir);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TWindow::handler(win, ep);
|
||||
}
|
||||
|
@ -1580,8 +1580,7 @@ TReport_field::TReport_field(TReport_section* sec)
|
||||
: _section(sec), _id(0), _type('T'), _rct(0,0,1000,100),
|
||||
_fgcolor(COLOR_BLACK), _bgcolor(COLOR_WHITE),
|
||||
_border(0), _halign('L'), _valign('T'),_dynamic_height(false), _font(NULL),
|
||||
_hidden(false), _deactivated(false), _hide_zeroes(false), _selected(false)
|
||||
|
||||
_hidden(false), _deactivated(false), _hide_zeroes(false), _selected(false)
|
||||
{ }
|
||||
|
||||
TReport_field::TReport_field(const TReport_field& rf) : _font(NULL)
|
||||
@ -1989,9 +1988,15 @@ bool TReport::get_report_field(const TString& name, TVariant& var) const
|
||||
|
||||
if (n == "PAGE")
|
||||
{
|
||||
var = curr_page();
|
||||
var = _rep_page;
|
||||
return true;
|
||||
} else
|
||||
if (n == "BOOK.PAGE")
|
||||
{
|
||||
var = _book_page;
|
||||
return true;
|
||||
}
|
||||
|
||||
TReport_field* fld = ((TReport*)this)->field(n);
|
||||
if (fld != NULL)
|
||||
{
|
||||
|
@ -408,7 +408,7 @@ class TReport : public TAlex_virtual_machine
|
||||
TString_array _params;
|
||||
TRecordset* _recordset;
|
||||
TReport_expr_cache _expressions;
|
||||
word _curr_page;
|
||||
word _rep_page, _book_page;
|
||||
TReport_field* _curr_field;
|
||||
|
||||
protected:
|
||||
@ -478,8 +478,8 @@ public:
|
||||
bool load(const char* fname);
|
||||
|
||||
// Used by TReport_printer
|
||||
void set_curr_page(word p) { _curr_page = p; }
|
||||
word curr_page() const { return _curr_page; }
|
||||
void set_page(word r, word p) { _rep_page = r; _book_page = p; }
|
||||
|
||||
void set_curr_field(TReport_field* fld) { _curr_field = fld; }
|
||||
TReport_field* curr_field() const { return _curr_field; }
|
||||
|
||||
|
@ -1247,7 +1247,7 @@ bool TReport_book::open_page()
|
||||
if (!TBook::open_page())
|
||||
return false;
|
||||
|
||||
_report->set_curr_page(page());
|
||||
_report->set_page(++_rep_page, page());
|
||||
|
||||
_page_break_allowed = false;
|
||||
_delta.reset();
|
||||
@ -1260,11 +1260,11 @@ bool TReport_book::open_page()
|
||||
_delta.reset();
|
||||
}
|
||||
|
||||
if (page() == 1)
|
||||
if (_rep_page == 1)
|
||||
_delta.y += print_section('H', 1);
|
||||
|
||||
TReport_section* page_head = _report->find_section('H', 0);
|
||||
if (page_head != NULL && (page() > 1 || !page_head->hidden_if_needed()))
|
||||
if (page_head != NULL && (_rep_page > 1 || !page_head->hidden_if_needed()))
|
||||
{
|
||||
_delta += page_head->pos();
|
||||
_delta.y += print_section(*page_head);
|
||||
@ -1413,6 +1413,7 @@ bool TReport_book::add(TReport& rep, bool progind)
|
||||
const int max_body = _report->find_max_level('B');
|
||||
int last_body_height = 0;
|
||||
|
||||
_rep_page = 0; // Azzera numero di pagina relativo
|
||||
_is_last_page = false;
|
||||
open_page();
|
||||
for (bool ok = rex->move_to(0); ok && !_print_aborted; ok = rex->move_next())
|
||||
|
@ -74,6 +74,7 @@ class TReport_book : public TBook
|
||||
long _logical_foot_pos;
|
||||
bool _is_last_page, _page_break_allowed;
|
||||
TPoint _delta;
|
||||
size_t _rep_page;
|
||||
|
||||
protected:
|
||||
virtual bool open_page();
|
||||
|
Loading…
x
Reference in New Issue
Block a user