Quote: |
void MyApp::preisliste() { Report r; Size s; r.ChooseDefaultPrinter("Preisliste"); s = Size(6000 * 210 / 254, 6000 * 297 / 254); r.SetPageSize(s); r.Margins(100, 100); String preisliste; preisliste << "[ [ [*2 Preisliste]&][2 &][ [2 Alle Preise sind Preise pro Anwesenheitstag.]&][2 &][ {{1935:1612:1612:1612:1612:1617h1; [= [2 Bezeichnung]]:: [= [2 Stufe 0]]:: [= [2 Stufe I]]:: [= [2 Stufe II]]:: [= [2 Stufe III]]:: [= [2 Stufe III Härtefall]]:: [ [2 Tagespflege]]:: [> [2 `_`_Preis0`_`_€]]:: [> [2 `_`_Preis1`_`_€]]:: [> [2 `_`_Preis2`_`_€]]:: [> [2 `_`_Preis3`_`_€]]:: [> [2 `_`_Preis4`_`_€]]:: [ [2 Altenpflegeumlage ][`2 `*]]:: [> [2 `_`_APU0`_`_€]]:: [> [2 `_`_APU1`_`_€]]:: [> [2 `_`_APU2`_`_€]]:: [> [2 `_`_APU3`_`_€]]:: [> [2 `_`_APU4`_`_€]]:: [ [2 Investitionskosten ][`2 `*`*]]:: [> [2 `_`_IKP0`_`_€]]:: [> [2 `_`_IKP1`_`_€]]:: [> [2 `_`_IKP2`_`_€]]:: [> [2 `_`_IKP3`_`_€]]:: [> [2 `_`_IKP4`_`_€]]:: [ [2 Unterkunft]]:: [> [2 `_`_U0`_`_€]]:: [> [2 `_`_U1`_`_€]]:: [> [2 `_`_U2`_`_€]]:: [> [2 `_`_U3`_`_€]]:: [> [2 `_`_U4`_`_€]]:: [ [2 Verpflegung]]:: [> [2 `_`_V0`_`_€]]:: [> [2 `_`_V1`_`_€]]:: [> [2 `_`_V2`_`_€]]:: [> [2 `_`_V3`_`_€]]:: [> [2 `_`_V4`_`_€]]:: [ [2 Unterkunft `+ Verpflegung]]:: [> [2 `_`_UV0`_`_€]]:: [> [2 `_`_UV1`_`_€]]:: [> [2 `_`_UV2`_`_€]]:: [> [2 `_`_UV3`_`_€]]:: [> [2 `_`_UV4`_`_€]]}}&][>2 &][# [`2 `*][2 Die Altenpflegeumlage ist im Preis für die Tagespflege enthalten.]&][# [`2 `*`*][2 Die Investitionskosten werden von der örtlichen Kommune übernommen.]&][#2 &][# [*2 Leistungen der Pflegekasse (normal)]&][#2 &][# [2 Ambulante Pflege hat Vorrang vor Tagespflege. Die Leistungen der Pflegekasse sind jeweils pro Monat zu verstehen.]&][#2 &][ {{1935:1612:1612:1612:1612:1617h1; [= [2 Bezeichnung]]:: [= [2 Stufe 0]]:: [= [2 Stufe I]]:: [= [2 Stufe II]]:: [= [2 Stufe III]]:: [= [2 Stufe III Härtefall]]:: [# [2 Pflegesachleistung (100 Prozent)]]:: [> [2 `_`_SachLeistung100St0`_`_€]]:: [> [2 `_`_SachLeistung100St1`_`_€]]:: [> [2 `_`_SachLeistung100St2`_`_€]]:: [> [2 `_`_SachLeistung100St3`_`_€]]:: [> [2 `_`_SachLeistung100St4`_`_€]]:: [# [2 Pflegesachleistung (50 Prozent)]]:: [> [2 `_`_SachLeistung50St0`_`_€]]:: [> [2 `_`_SachLeistung50St1`_`_€]]:: [> [2 `_`_SachLeistung50St2`_`_€]]:: [> [2 `_`_SachLeistung50St3`_`_€]]:: [> [2 `_`_SachLeistung50St4`_`_€]]:: [# [2 Pflegesachleistung (150 Prozent)]]:: [> [2 `_`_SachLeistung150St0`_`_€]]:: [> [2 `_`_SachLeistung150St1`_`_€]]:: [> [2 `_`_SachLeistung150St2`_`_€]]:: [> [2 `_`_SachLeistung150St3`_`_€]]:: [> [2 `_`_SachLeistung150St4`_`_€]]:: [# [2 Pflegegeld]]:: [> [2 `_`_PG0`_`_€]]:: [> [2 `_`_PG1`_`_€]]:: [> [2 `_`_PG2`_`_€]]:: [> [2 `_`_PG3`_`_€]]:: [> [2 `_`_PG4`_`_€]]}}&][#2 &][# [*2 Leistungen der Pflegekasse (bei eingeschränkter Alterskompetenz)]&][#2 &][# [2 Ambulante Pflege hat Vorrang vor Tagespflege. Die Leistungen der Pflegekasse sind jeweils pro Monat zu verstehen.]&][#2 &][ {{1935:1612:1612:1612:1612:1617h1; [= [2 Bezeichnung]]:: [= [2 Stufe 0]]:: [= [2 Stufe I]]:: [= [2 Stufe II]]:: [= [2 Stufe III]]:: [= [2 Stufe III Härtefall]]:: [# [2 Pflegesachleistung (100 Prozent)]]:: [> [2 `_`_SachLeistungeA100St0`_`_€]]:: [> [2 `_`_SachLeistungeA100St1`_`_€]]:: [> [2 `_`_SachLeistungeA100St2`_`_€]]:: [> [2 `_`_SachLeistungeA100St3`_`_€]]:: [> [2 `_`_SachLeistungeA100St4`_`_€]]:: [# [2 Pflegesachleistung (50 Prozent)]]:: [> [2 `_`_SachLeistungeA50St0`_`_€]]:: [> [2 `_`_SachLeistungeA50St1`_`_€]]:: [> [2 `_`_SachLeistungeA50St2`_`_€]]:: [> [2 `_`_SachLeistungeA50St3`_`_€]]:: [> [2 `_`_SachLeistungeA50St4`_`_€]]:: [# [2 Pflegesachleistung (150 Prozent)]]:: [> [2 `_`_SachLeistungeA150St0`_`_€]]:: [> [2 `_`_SachLeistungeA150St1`_`_€]]:: [> [2 `_`_SachLeistungeA150St2`_`_€]]:: [> [2 `_`_SachLeistungeA150St3`_`_€]]:: [> [2 `_`_SachLeistungeA150St4`_`_€]]:: [# [2 zusätzliche Betreuungsleistung]]:: [> [2 `_`_PK45`_`_€]]:: [> [2 `_`_PK45`_`_€]]:: [> [2 `_`_PK45`_`_€]]:: [> [2 `_`_PK45`_`_€]]:: [> [2 `_`_PK45`_`_€]]:: [# [2 zusätzliche Betreuungsleistung (erhöht)]]:: [> [2 `_`_PK45`+`_`_€]]:: [> [2 `_`_PK45`+`_`_€]]:: [> [2 `_`_PK45`+`_`_€]]:: [> [2 `_`_PK45`+`_`_€]]:: [> [2 `_`_PK45`+`_`_€]]:: [# [2 Pflegegeld]]:: [> [2 `_`_PGeA0`_`_€]]:: [> [2 `_`_PGeA1`_`_€]]:: [> [2 `_`_PGeA2`_`_€]]:: [> [2 `_`_PGeA3`_`_€]]:: [> [2 `_`_PGeA4`_`_€]]}}&][#2 &][# [2 Die zusätzlichen Betreuungsleistungen können zur Abrechnung von allen Leistungen der Tagespflege genutzt werden, inklusive Fahrtkosten.]&][# &][> [*1 alle Angaben ohne Gewähr]]]"; // here we have lots of Replaces, I included just one example.. preisliste.Replace("`_`_PK45`+`_`_", Format("%2,!nl", 200.0)); r << preisliste; Perform(r); } |
mirek wrote on Mon, 11 February 2013 19:58 |
(BTW, in my Linux PDF viewer there is "Fit to page" option that is on by default, it can skew results when testing). |
mirek wrote on Mon, 11 February 2013 19:58 |
(BTW, in my Linux PDF viewer there is "Fit to page" option that is on by default, it can skew results when testing). |
mirek wrote on Mon, 11 February 2013 21:20 |
Give svn a thought. In the end, it is the most convenient way to keep yourself in sync with development. |
mirek wrote on Tue, 12 February 2013 02:08 |
Well, I would say we are not that far from that, at least for physical prints. You can replace automatic centering with Margin (in fact, it should rather be called "offset" or perhaps "topleft") and physical prints should be ok (but take into account that with real printers, there will be up to 5 mm difference from one sheet printed to another). After that, I am willing to change PDF export too to comply, but I guess it might require some new parameters to Report/PdfDraw. Mirek |
Quote: |
Anyway, name clashes happen, in this particular case I would mind renaming to ReportDraw, but it would be backward incompatibility... |