Добрый день.
Подскажите, пожалуйста - попытался создать бирку (на паскале) по ролику на ютуб канале базиса с выводом разной толщины кромки, но появляется ошибка "Could not convert variant of type (UnicodeString) into type (Double)", хотя вроде передрано в точности - в чем ошибка и как ее исправить?
PHP код:
procedure Line1OnBeforePrint(Sender: TfrxComponent);
var WidthTick, rrr: double;
sss: string;
begin
sss := <Параметры."См.черт.">;
Line1.Visible := true;
WidthTick := StrToFloat(<Параметры."Кромка L1 толщ.">);
if WidthTick = 0 then
begin
if (VarToStr(<Параметры."Кромка L1 обозн.">) <> '') and (VarToStr(<Параметры."Кромка L1 обозн.">) = sss) then
begin
Line1.Frame.Style := fsDot;
Line1.Frame.Width := 2;
end
else Line1.Visible := false;
end
else
begin
Line1.Frame.Style := fsSolid;
Line1.Frame.Width := WidthTick * 2;
end;
Line2.Visible := true;
WidthTick := StrToFloat(<Параметры."Кромка L2 толщ.">);
if WidthTick = 0 then
begin
if (VarToStr(<Параметры."Кромка L2 обозн.">) <> '') and (VarToStr(<Параметры."Кромка L2 обозн.">) = sss) then
begin
Line2.Frame.Style := fsDot;
Line2.Frame.Width := 2;
end
else Line2.Visible := false;
end
else
begin
Line2.Frame.Style := fsSolid;
Line2.Frame.Width := WidthTick * 2;
end;
Line3.Visible := true;
WidthTick := StrToFloat(<Параметры."Кромка W1 толщ.">);
if WidthTick = 0 then
begin
if (VarToStr(<Параметры."Кромка W1 обозн.">) <> '') and (VarToStr(<Параметры."Кромка W1 обозн.">) = sss) then
begin
Line3.Frame.Style := fsDot;
Line3.Frame.Width := 2;
end
else Line3.Visible := false;
end
else
begin
Line3.Frame.Style := fsSolid;
Line3.Frame.Width := WidthTick * 2;
end;
Line4.Visible := true;
WidthTick := StrToFloat(<Параметры."Кромка W2 толщ.">);
if WidthTick = 0 then
begin
if (VarToStr(<Параметры."Кромка W2 обозн.">) <> '') and (VarToStr(<Параметры."Кромка W2 обозн.">) = sss) then
begin
Line4.Frame.Style := fsDot;
Line4.Frame.Width := 2;
end
else Line4.Visible := false;
end
else
begin
Line4.Frame.Style := fsSolid;
Line4.Frame.Width := WidthTick * 2;
end;
end;
procedure Barcode2D2OnBeforePrint(Sender: TfrxComponent);
begin
Barcode2D2.Visible := False;
Picture8.Visible := True;
if <Параметры."Кол. гл. отв. в пласть низ"> > 0 then
begin
Barcode2D2.Visible := True;
Picture8.Visible := False;
end;
end;
procedure Barcode2D1OnBeforePrint(Sender: TfrxComponent);
begin
Barcode2D1.Visible := False;
Picture7.Visible := True;
if <Параметры."Кол. гл. отв. в пласть верх"> +
<Параметры."Кол. отв. в торец"> +
<Параметры."Кол. прямол. пазов"> +
<Параметры."Кол. кривол. пазов"> > 0 then
begin
Barcode2D1.Visible := True;
Picture7.Visible := False;
end;
end;
procedure Picture10OnBeforePrint(Sender: TfrxComponent);
begin
Picture10.Visible := False;
Picture14.Visible := True;
if <Параметры."Кол. гл. отв. в пласть"> +
<Параметры."Кол. скв. отв. в пласть"> +
<Параметры."Кол. отв. в торец"> > 0 then
begin
Picture10.Visible := True;
Picture14.Visible := False;
end;
end;
procedure Picture11OnBeforePrint(Sender: TfrxComponent);
begin
Picture11.Visible := False;
Picture15.Visible := True;
if <Параметры."Паз"> <> '' then
begin
Picture11.Visible := True;
Picture15.Visible := False;
end;
end;
procedure Picture12OnBeforePrint(Sender: TfrxComponent);
begin
Picture12.Visible := False;
Picture16.Visible := True;
if <Параметры."Пластик"> > 0 then
begin
Picture12.Visible := True;
Picture16.Visible := False;
end;
end;
procedure Picture13OnBeforePrint(Sender: TfrxComponent);
begin
Picture13.Visible := False;
Picture17.Visible := True;
if <Параметры."Контур"> <> '' then
begin
Picture13.Visible := True;
Picture17.Visible := False;
end;
end;
begin
end.