ich habe fast alle meiner Drucks auf eine Generische
Unit umgestellt der Datasets, Variablen, Reports, Callbacks etc.
im Execute mitgegeben werden, der Variablenteil sieht so aus ....
Delphi-Quellcode:
Procedure TDM.PrintEttis;
var
vars: TFrxVariables;
...
begin
vars := TFrxVariables.Create;
try
for i := 0 to FReportingList.Count - 1 do
begin
With vars.Add do
begin
Name := FReportingList.Names[i];
Value := QuotedStr(FReportingList.Values[i]);
end;
end;
...
...
TFPrintF.Execute(... ,vars, .... ....
end;
TFPrintF.Execute(... ,vars, .... ....);
begin
....
for i := 0 to Report.Variables.Count - 1 do
begin
Report.Variables.Items[i].Value := QuotedStr('');
end;
if Assigned(Variables) then
for i := 0 to Variables.Count - 1 do
begin
k := Report.Variables.IndexOf(Variables.Items[i].Name);
if k > -1 then
Report.Variables.Items[k].Value := Variables.Items[i].Value
else
begin
with Report.Variables.Add do
begin
Name := Variables.Items[i].Name;
Value := Variables.Items[i].Value;
end;
end;
end;
....
end;