diff --git a/components/tvplanit/examples/fulldemo/demo.lpi b/components/tvplanit/examples/fulldemo/demo.lpi
index 9f96f2434..ef4e2ca6e 100644
--- a/components/tvplanit/examples/fulldemo/demo.lpi
+++ b/components/tvplanit/examples/fulldemo/demo.lpi
@@ -42,7 +42,7 @@
-
+
@@ -59,6 +59,13 @@
+
+
+
+
+
+
+
diff --git a/components/tvplanit/examples/fulldemo/demomain.pas b/components/tvplanit/examples/fulldemo/demomain.pas
index bbaa89c68..c18c7de83 100644
--- a/components/tvplanit/examples/fulldemo/demomain.pas
+++ b/components/tvplanit/examples/fulldemo/demomain.pas
@@ -150,7 +150,7 @@ uses
LCLVersion, LResources, LazFileUtils, LazUTF8, StrUtils, DateUtils, Translations,
IniFiles, Math, Printers,
VpMisc, VpPrtFmt,
- sound;
+ sound, ExVpRptSetup;
{$UNDEF UTF8_CALLS}
{$IFDEF LCL}
@@ -401,14 +401,30 @@ begin
end;
procedure TMainForm.MnuPrintClick(Sender: TObject);
+var
+ F: TfrmReportSetup;
begin
- if PrintDialog1.Execute then begin
- Printer.BeginDoc;
- {
- VpControlLink1.Printer.CurFormat := VpControlLink1.Printer.Find(ReportData.Format);
- VpControlLink1.Printer.Print(Printer, ReportData.StartDate, ReportData.EndDate);
- }
- Printer.EndDoc;
+ if ReportData.StartDate = 0 then
+ ReportData.StartDate := VpMonthView1.Date;
+ if ReportData.EndDate = 0 then
+ ReportData.EndDate := VpMonthView1.Date;
+ if ReportData.Format = '' then
+ ReportData.Format := VpControlLink1.Printer.PrintFormats.Items[0].FormatName;
+
+ F := TfrmReportSetup.Create(nil);
+ try
+ F.ControlLink := VpControlLink1;
+ if not F.Execute(ReportData) then
+ exit;
+
+ if PrintDialog1.Execute then begin
+ Printer.BeginDoc;
+ VpControlLink1.Printer.CurFormat := VpControlLink1.Printer.Find(ReportData.Format);
+ VpControlLink1.Printer.Print(Printer, ReportData.StartDate, ReportData.EndDate);
+ Printer.EndDoc;
+ end;
+ finally
+ F.Free;
end;
end;
diff --git a/components/tvplanit/languages/demo.de.po b/components/tvplanit/languages/demo.de.po
index 9be9d9db1..2ebbc706f 100644
--- a/components/tvplanit/languages/demo.de.po
+++ b/components/tvplanit/languages/demo.de.po
@@ -145,62 +145,64 @@ msgstr "Mittwoch"
msgid "XML files (*.xml)"
msgstr "XML-Dateien (*.XML)"
-#: tfrmreportsetup.button1.caption
-msgctxt "tfrmreportsetup.button1.caption"
-msgid "OK"
-msgstr "OK"
-
-#: tfrmreportsetup.button2.caption
-msgctxt "tfrmreportsetup.button2.caption"
+#: tfrmreportsetup.btncancel.caption
+#, fuzzy
+msgctxt "tfrmreportsetup.btncancel.caption"
msgid "Cancel"
msgstr "Abbrechen"
+#: tfrmreportsetup.btnok.caption
+#, fuzzy
+msgctxt "tfrmreportsetup.btnok.caption"
+msgid "OK"
+msgstr "OK"
+
#: tfrmreportsetup.caption
msgid "Report Setup"
msgstr ""
-#: tfrmreportsetup.dateedit1.cancelcaption
-msgctxt "tfrmreportsetup.dateedit1.cancelcaption"
+#: tfrmreportsetup.edenddate.cancelcaption
+#, fuzzy
+msgctxt "tfrmreportsetup.edenddate.cancelcaption"
msgid "Cancel"
msgstr "Abbrechen"
-#: tfrmreportsetup.dateedit1.okcaption
-msgctxt "tfrmreportsetup.dateedit1.okcaption"
+#: tfrmreportsetup.edenddate.okcaption
+#, fuzzy
+msgctxt "tfrmreportsetup.edenddate.okcaption"
msgid "OK"
msgstr "OK"
-# No need to translate
-#: tfrmreportsetup.dateedit1.text
-msgid "DateEdit1"
-msgstr ""
-
-#: tfrmreportsetup.dateedit2.cancelcaption
-msgctxt "tfrmreportsetup.dateedit2.cancelcaption"
+#: tfrmreportsetup.edstartdate.cancelcaption
+#, fuzzy
+msgctxt "tfrmreportsetup.edstartdate.cancelcaption"
msgid "Cancel"
msgstr "Abbrechen"
-#: tfrmreportsetup.dateedit2.okcaption
-msgctxt "tfrmreportsetup.dateedit2.okcaption"
+#: tfrmreportsetup.edstartdate.okcaption
+#, fuzzy
+msgctxt "tfrmreportsetup.edstartdate.okcaption"
msgid "OK"
msgstr "OK"
-# No need to translate
-#: tfrmreportsetup.dateedit2.text
-msgid "DateEdit2"
-msgstr ""
-
-#: tfrmreportsetup.label1.caption
-msgid "Start Date:"
-msgstr "Startdatum:"
-
-#: tfrmreportsetup.label2.caption
+#: tfrmreportsetup.lblenddate.caption
+#, fuzzy
+msgctxt "tfrmreportsetup.lblenddate.caption"
msgid "End Date:"
msgstr "Enddatum:"
-#: tfrmreportsetup.label3.caption
+#: tfrmreportsetup.lblformat.caption
+#, fuzzy
+msgctxt "tfrmreportsetup.lblformat.caption"
msgid "Format:"
msgstr "Format:"
+#: tfrmreportsetup.lblstartdate.caption
+#, fuzzy
+msgctxt "tfrmreportsetup.lblstartdate.caption"
+msgid "Start Date:"
+msgstr "Startdatum:"
+
#: tmainform.btndeleteres.caption
msgid "Delete"
msgstr "Löschen"
@@ -327,3 +329,4 @@ msgstr "Fertiggestellte Aufgaben ausblenden"
#: tmainform.titlelbl.caption
msgid "TitleLbl"
msgstr ""
+
diff --git a/components/tvplanit/languages/demo.nl.po b/components/tvplanit/languages/demo.nl.po
index 69a74ba11..dae45093e 100644
--- a/components/tvplanit/languages/demo.nl.po
+++ b/components/tvplanit/languages/demo.nl.po
@@ -134,60 +134,64 @@ msgstr "Woensdag"
msgid "XML files (*.xml)"
msgstr ""
-#: tfrmreportsetup.button1.caption
-msgctxt "tfrmreportsetup.button1.caption"
-msgid "OK"
-msgstr "OK"
-
-#: tfrmreportsetup.button2.caption
-msgctxt "tfrmreportsetup.button2.caption"
+#: tfrmreportsetup.btncancel.caption
+#, fuzzy
+msgctxt "tfrmreportsetup.btncancel.caption"
msgid "Cancel"
msgstr "Annuleren"
+#: tfrmreportsetup.btnok.caption
+#, fuzzy
+msgctxt "tfrmreportsetup.btnok.caption"
+msgid "OK"
+msgstr "OK"
+
#: tfrmreportsetup.caption
msgid "Report Setup"
msgstr "Overzicht Instellingen"
-#: tfrmreportsetup.dateedit1.cancelcaption
-msgctxt "TFRMREPORTSETUP.DATEEDIT1.CANCELCAPTION"
+#: tfrmreportsetup.edenddate.cancelcaption
+#, fuzzy
+msgctxt "tfrmreportsetup.edenddate.cancelcaption"
msgid "Cancel"
msgstr "Annuleren"
-#: tfrmreportsetup.dateedit1.okcaption
-msgctxt "TFRMREPORTSETUP.DATEEDIT1.OKCAPTION"
+#: tfrmreportsetup.edenddate.okcaption
+#, fuzzy
+msgctxt "tfrmreportsetup.edenddate.okcaption"
msgid "OK"
msgstr "OK"
-#: tfrmreportsetup.dateedit1.text
-msgid "DateEdit1"
-msgstr "DateEdit1"
-
-#: tfrmreportsetup.dateedit2.cancelcaption
-msgctxt "TFRMREPORTSETUP.DATEEDIT2.CANCELCAPTION"
+#: tfrmreportsetup.edstartdate.cancelcaption
+#, fuzzy
+msgctxt "tfrmreportsetup.edstartdate.cancelcaption"
msgid "Cancel"
msgstr "Annuleren"
-#: tfrmreportsetup.dateedit2.okcaption
-msgctxt "TFRMREPORTSETUP.DATEEDIT2.OKCAPTION"
+#: tfrmreportsetup.edstartdate.okcaption
+#, fuzzy
+msgctxt "tfrmreportsetup.edstartdate.okcaption"
msgid "OK"
msgstr "OK"
-#: tfrmreportsetup.dateedit2.text
-msgid "DateEdit2"
-msgstr "DateEdit2"
-
-#: tfrmreportsetup.label1.caption
-msgid "Start Date:"
-msgstr "Start Datum:"
-
-#: tfrmreportsetup.label2.caption
+#: tfrmreportsetup.lblenddate.caption
+#, fuzzy
+msgctxt "tfrmreportsetup.lblenddate.caption"
msgid "End Date:"
msgstr "Eind Datum:"
-#: tfrmreportsetup.label3.caption
+#: tfrmreportsetup.lblformat.caption
+#, fuzzy
+msgctxt "tfrmreportsetup.lblformat.caption"
msgid "Format:"
msgstr "Formaat:"
+#: tfrmreportsetup.lblstartdate.caption
+#, fuzzy
+msgctxt "tfrmreportsetup.lblstartdate.caption"
+msgid "Start Date:"
+msgstr "Start Datum:"
+
#: tmainform.btndeleteres.caption
msgid "Delete"
msgstr "Wissen"
diff --git a/components/tvplanit/languages/demo.po b/components/tvplanit/languages/demo.po
index ac02906d6..036dc7cb8 100644
--- a/components/tvplanit/languages/demo.po
+++ b/components/tvplanit/languages/demo.po
@@ -134,60 +134,55 @@ msgstr ""
msgid "XML files (*.xml)"
msgstr ""
-#: tfrmreportsetup.button1.caption
-msgctxt "tfrmreportsetup.button1.caption"
-msgid "OK"
+#: tfrmreportsetup.btncancel.caption
+msgctxt "tfrmreportsetup.btncancel.caption"
+msgid "Cancel"
msgstr ""
-#: tfrmreportsetup.button2.caption
-msgctxt "tfrmreportsetup.button2.caption"
-msgid "Cancel"
+#: tfrmreportsetup.btnok.caption
+msgctxt "tfrmreportsetup.btnok.caption"
+msgid "OK"
msgstr ""
#: tfrmreportsetup.caption
msgid "Report Setup"
msgstr ""
-#: tfrmreportsetup.dateedit1.cancelcaption
-msgctxt "TFRMREPORTSETUP.DATEEDIT1.CANCELCAPTION"
+#: tfrmreportsetup.edenddate.cancelcaption
+msgctxt "tfrmreportsetup.edenddate.cancelcaption"
msgid "Cancel"
msgstr ""
-#: tfrmreportsetup.dateedit1.okcaption
-msgctxt "TFRMREPORTSETUP.DATEEDIT1.OKCAPTION"
+#: tfrmreportsetup.edenddate.okcaption
+msgctxt "tfrmreportsetup.edenddate.okcaption"
msgid "OK"
msgstr ""
-#: tfrmreportsetup.dateedit1.text
-msgid "DateEdit1"
-msgstr ""
-
-#: tfrmreportsetup.dateedit2.cancelcaption
-msgctxt "TFRMREPORTSETUP.DATEEDIT2.CANCELCAPTION"
+#: tfrmreportsetup.edstartdate.cancelcaption
+msgctxt "tfrmreportsetup.edstartdate.cancelcaption"
msgid "Cancel"
msgstr ""
-#: tfrmreportsetup.dateedit2.okcaption
-msgctxt "TFRMREPORTSETUP.DATEEDIT2.OKCAPTION"
+#: tfrmreportsetup.edstartdate.okcaption
+msgctxt "tfrmreportsetup.edstartdate.okcaption"
msgid "OK"
msgstr ""
-#: tfrmreportsetup.dateedit2.text
-msgid "DateEdit2"
-msgstr ""
-
-#: tfrmreportsetup.label1.caption
-msgid "Start Date:"
-msgstr ""
-
-#: tfrmreportsetup.label2.caption
+#: tfrmreportsetup.lblenddate.caption
+msgctxt "tfrmreportsetup.lblenddate.caption"
msgid "End Date:"
msgstr ""
-#: tfrmreportsetup.label3.caption
+#: tfrmreportsetup.lblformat.caption
+msgctxt "tfrmreportsetup.lblformat.caption"
msgid "Format:"
msgstr ""
+#: tfrmreportsetup.lblstartdate.caption
+msgctxt "tfrmreportsetup.lblstartdate.caption"
+msgid "Start Date:"
+msgstr ""
+
#: tmainform.btndeleteres.caption
msgid "Delete"
msgstr ""
diff --git a/components/tvplanit/languages/demo.ru.po b/components/tvplanit/languages/demo.ru.po
index 5b74dee59..edb5e0489 100644
--- a/components/tvplanit/languages/demo.ru.po
+++ b/components/tvplanit/languages/demo.ru.po
@@ -144,62 +144,61 @@ msgstr "Среда"
msgid "XML files (*.xml)"
msgstr ""
-#: tfrmreportsetup.button1.caption
-msgctxt "tfrmreportsetup.button1.caption"
-msgid "OK"
-msgstr ""
-
-#: tfrmreportsetup.button2.caption
-msgctxt "tfrmreportsetup.button2.caption"
+#: tfrmreportsetup.btncancel.caption
+#, fuzzy
+msgctxt "tfrmreportsetup.btncancel.caption"
msgid "Cancel"
msgstr "Отмена"
+#: tfrmreportsetup.btnok.caption
+msgctxt "tfrmreportsetup.btnok.caption"
+msgid "OK"
+msgstr ""
+
#: tfrmreportsetup.caption
msgid "Report Setup"
msgstr "Параметры отчёта"
-#: tfrmreportsetup.dateedit1.cancelcaption
-msgctxt "TFRMREPORTSETUP.DATEEDIT1.CANCELCAPTION"
+#: tfrmreportsetup.edenddate.cancelcaption
+#, fuzzy
+msgctxt "tfrmreportsetup.edenddate.cancelcaption"
msgid "Cancel"
msgstr "Отмена"
-#: tfrmreportsetup.dateedit1.okcaption
-msgctxt "TFRMREPORTSETUP.DATEEDIT1.OKCAPTION"
+#: tfrmreportsetup.edenddate.okcaption
+msgctxt "tfrmreportsetup.edenddate.okcaption"
msgid "OK"
msgstr ""
-# No need to translate
-#: tfrmreportsetup.dateedit1.text
-msgid "DateEdit1"
-msgstr ""
-
-#: tfrmreportsetup.dateedit2.cancelcaption
-msgctxt "TFRMREPORTSETUP.DATEEDIT2.CANCELCAPTION"
+#: tfrmreportsetup.edstartdate.cancelcaption
+#, fuzzy
+msgctxt "tfrmreportsetup.edstartdate.cancelcaption"
msgid "Cancel"
msgstr "Отмена"
-#: tfrmreportsetup.dateedit2.okcaption
-msgctxt "TFRMREPORTSETUP.DATEEDIT2.OKCAPTION"
+#: tfrmreportsetup.edstartdate.okcaption
+msgctxt "tfrmreportsetup.edstartdate.okcaption"
msgid "OK"
msgstr ""
-# No need to translate
-#: tfrmreportsetup.dateedit2.text
-msgid "DateEdit2"
-msgstr ""
-
-#: tfrmreportsetup.label1.caption
-msgid "Start Date:"
-msgstr "Дата начала:"
-
-#: tfrmreportsetup.label2.caption
+#: tfrmreportsetup.lblenddate.caption
+#, fuzzy
+msgctxt "tfrmreportsetup.lblenddate.caption"
msgid "End Date:"
msgstr "Дата окончания:"
-#: tfrmreportsetup.label3.caption
+#: tfrmreportsetup.lblformat.caption
+#, fuzzy
+msgctxt "tfrmreportsetup.lblformat.caption"
msgid "Format:"
msgstr "Формат:"
+#: tfrmreportsetup.lblstartdate.caption
+#, fuzzy
+msgctxt "tfrmreportsetup.lblstartdate.caption"
+msgid "Start Date:"
+msgstr "Дата начала:"
+
#: tmainform.btndeleteres.caption
msgid "Delete"
msgstr "Удалить"
diff --git a/components/tvplanit/languages/vpsr.de.po b/components/tvplanit/languages/vpsr.de.po
index c72d87564..ebad14155 100644
--- a/components/tvplanit/languages/vpsr.de.po
+++ b/components/tvplanit/languages/vpsr.de.po
@@ -551,6 +551,10 @@ msgstr "Vorname:"
msgid "Font..."
msgstr "Schriftart..."
+#: vpsr.rsformatlbl
+msgid "Format:"
+msgstr "Format:"
+
#: vpsr.rsformats
msgid "Formats:"
msgstr "Formate:"
@@ -1041,6 +1045,10 @@ msgstr "Termin-Wiederholung:"
msgid "Reminder"
msgstr "Erinnerung"
+#: vpsr.rsreportsetup
+msgid "Report setup"
+msgstr "Druck einrichten"
+
#: vpsr.rsresource
msgid "Resource"
msgstr "Ressource"
diff --git a/components/tvplanit/languages/vpsr.nl.po b/components/tvplanit/languages/vpsr.nl.po
index 1fb356bda..60510bf08 100644
--- a/components/tvplanit/languages/vpsr.nl.po
+++ b/components/tvplanit/languages/vpsr.nl.po
@@ -554,6 +554,10 @@ msgstr "Voornaam:"
msgid "Font..."
msgstr ""
+#: vpsr.rsformatlbl
+msgid "Format:"
+msgstr ""
+
#: vpsr.rsformats
msgid "Formats:"
msgstr ""
@@ -1044,6 +1048,10 @@ msgstr "Afspraak herhaling:"
msgid "Reminder"
msgstr "Herinnering"
+#: vpsr.rsreportsetup
+msgid "Report setup"
+msgstr ""
+
#: vpsr.rsresource
msgid "Resource"
msgstr "Hulpmiddel"
diff --git a/components/tvplanit/languages/vpsr.po b/components/tvplanit/languages/vpsr.po
index 30fd91aa5..d209f9891 100644
--- a/components/tvplanit/languages/vpsr.po
+++ b/components/tvplanit/languages/vpsr.po
@@ -541,6 +541,10 @@ msgstr ""
msgid "Font..."
msgstr ""
+#: vpsr.rsformatlbl
+msgid "Format:"
+msgstr ""
+
#: vpsr.rsformats
msgid "Formats:"
msgstr ""
@@ -1031,6 +1035,10 @@ msgstr ""
msgid "Reminder"
msgstr ""
+#: vpsr.rsreportsetup
+msgid "Report setup"
+msgstr ""
+
#: vpsr.rsresource
msgid "Resource"
msgstr ""
diff --git a/components/tvplanit/languages/vpsr.ru.po b/components/tvplanit/languages/vpsr.ru.po
index bda7c72c7..5bc964794 100644
--- a/components/tvplanit/languages/vpsr.ru.po
+++ b/components/tvplanit/languages/vpsr.ru.po
@@ -551,6 +551,10 @@ msgstr "Имя:"
msgid "Font..."
msgstr "Шрифт..."
+#: vpsr.rsformatlbl
+msgid "Format:"
+msgstr ""
+
#: vpsr.rsformats
msgid "Formats:"
msgstr "Форматы:"
@@ -1041,6 +1045,10 @@ msgstr "Повторение встречи:"
msgid "Reminder"
msgstr "Напоминание"
+#: vpsr.rsreportsetup
+msgid "Report setup"
+msgstr ""
+
#: vpsr.rsresource
msgid "Resource"
msgstr "Ресурс"
diff --git a/components/tvplanit/source/vpsr.inc b/components/tvplanit/source/vpsr.inc
index 66cbf49bc..85228d1aa 100644
--- a/components/tvplanit/source/vpsr.inc
+++ b/components/tvplanit/source/vpsr.inc
@@ -409,6 +409,7 @@ resourcestring
{ Print Format Editor }
RSEditPrintFormat = 'Edit Print Formats...';
RSPrintFormatDesigner = 'Print format designer';
+ RSFormatLbl = 'Format:';
RSFormats = 'Formats:';
RSElements = 'Elements:';
RSNewBtn = 'New';
@@ -419,6 +420,8 @@ resourcestring
RSLoadFileBtn = 'Load file...';
RSSaveFileBtn = 'Save file...';
+ RSReportSetup = 'Report setup';
+
{ Print Format Item Editor }
RSEditFormatCaption= 'Edit format';
RSNameLbl = 'Name:';