diff --git a/uppdev/ReportWithChineseCharacter/main.cpp b/uppdev/ReportWithChineseCharacter/main.cpp index 8d0e6a1e8..42f7cc27c 100644 --- a/uppdev/ReportWithChineseCharacter/main.cpp +++ b/uppdev/ReportWithChineseCharacter/main.cpp @@ -5,14 +5,15 @@ using namespace Upp; GUI_APP_MAIN { Report r; - r.Header("[A2> Page $$P"); + r.Header("[A2< Header Page $$P"); + r.Footer("[A2> Footer Page $$P"); r << "This is some [* QTF text"; r << t_("顯示[* QTF 文字"); r << "&&Let's report some table:"; r << t_("輸出表格式報表:"); String tab; tab << "{{1:1:1:1:1:1:2 A:: B:: C:: D:: E:: F:: G (wider)"; - for(int row = 0; row < 20; row++) + for(int row = 0; row < 200; row++) for(int column = 0; column < 7; column++) tab << ":: " << row << ":" << column << t_("測試"); r << tab; diff --git a/uppdev/Reports/main.cpp b/uppdev/Reports/main.cpp index a276cf899..179110ebc 100644 --- a/uppdev/Reports/main.cpp +++ b/uppdev/Reports/main.cpp @@ -2,10 +2,24 @@ using namespace Upp; +void Background(Report *r) +{ + LOG("Background"); + DDUMP(r->GetPages().GetCount()); + Draw& w = *r; + Size sz = r->GetSize(); + Image m = CtrlImg::exclamation(); + Size isz = m.GetSize(); + for(int x = -isz.cx / 2; x < sz.cx; x += isz.cx) + for(int y = -isz.cy / 2; y < sz.cy; y += isz.cy) + w.DrawImage(x, y, m); +} + GUI_APP_MAIN { Report r; - r << "@@iml:400*400`CtrlImg:exclamation`"; + r.OnPage(callback1(Background, &r)).Header("THIS IS HEADER!"); + r << LoadFile(GetHomeDirFile("smlouva.qtf")); Perform(r); }