Показать сообщение отдельно
Старый 04.11.2022, 11:08   #4
HaddinG
Новичок
 
Регистрация: 27.06.2022
Сообщений: 1
Сказал(а) спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщениях
Вес репутации: 0
HaddinG пока не определено
По умолчанию

Добрый день.
Подскажите, пожалуйста - попытался создать бирку (на паскале) по ролику на ютуб канале базиса с выводом разной толщины кромки, но появляется ошибка "Could not convert variant of type (UnicodeString) into type (Double)", хотя вроде передрано в точности - в чем ошибка и как ее исправить?
PHP код:
procedure Line1OnBeforePrint(SenderTfrxComponent);
var 
WidthTickrrrdouble;
    
sssstring;
begin
  sss 
:= <Параметры."См.черт.">;

  
Line1.Visible := true;
  
WidthTick := StrToFloat(<Параметры."Кромка L1 толщ.">);
  if 
WidthTick 0 then
  begin
    
if (VarToStr(<Параметры."Кромка L1 обозн.">) <> '') and (VarToStr(<Параметры."Кромка L1 обозн.">) = sssthen
    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 обозн.">) = sssthen
    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 обозн.">) = sssthen
    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 обозн.">) = sssthen
    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(SenderTfrxComponent);
begin
  Barcode2D2
.Visible := False;
  
Picture8.Visible := True;
  if <
Параметры."Кол. гл. отв. в пласть низ"> > 0 then
  begin
    Barcode2D2
.Visible := True;
    
Picture8.Visible := False;
  
end;
end;

procedure Barcode2D1OnBeforePrint(SenderTfrxComponent);  
begin
  Barcode2D1
.Visible := False;
  
Picture7.Visible := True;
  if <
Параметры."Кол. гл. отв. в пласть верх"> +
     <
Параметры."Кол. отв. в торец"> +
     <
Параметры."Кол. прямол. пазов"> +
     <
Параметры."Кол. кривол. пазов"> > 0 then
     begin
       Barcode2D1
.Visible := True;
       
Picture7.Visible := False;
     
end;
end;

procedure Picture10OnBeforePrint(SenderTfrxComponent);
begin
   Picture10
.Visible := False;
   
Picture14.Visible := True;
   if <
Параметры."Кол. гл. отв. в пласть"> +
      <
Параметры."Кол. скв. отв. в пласть"> +
      <
Параметры."Кол. отв. в торец"> > 0 then
      begin
        Picture10
.Visible := True;
        
Picture14.Visible := False;
      
end;
end;

procedure Picture11OnBeforePrint(SenderTfrxComponent);
begin
   Picture11
.Visible := False;
   
Picture15.Visible := True;
   if <
Параметры."Паз"> <> '' then
      begin
        Picture11
.Visible := True;
        
Picture15.Visible := False;
      
end;
end;

procedure Picture12OnBeforePrint(SenderTfrxComponent);
begin
  Picture12
.Visible := False;
   
Picture16.Visible := True;
   if <
Параметры."Пластик"> > 0 then
      begin
        Picture12
.Visible := True;
        
Picture16.Visible := False;
      
end;
end;

procedure Picture13OnBeforePrint(SenderTfrxComponent);
begin
  Picture13
.Visible := False;
   
Picture17.Visible := True;
   if <
Параметры."Контур"> <> '' then
      begin
        Picture13
.Visible := True;
        
Picture17.Visible := False;
      
end;
end;

begin

end


Последний раз редактировалось AlexBolton; 05.11.2022 в 14:55. Причина: оформление
HaddinG вне форума   Ответить с цитированием Вверх