pascalscript - 将新的 ifclause 添加到过程后出现调试错误“;预期”
问题描述
在将ifclause
for Art 添加到 MasterReport 以乘以 Netto 总计乘以在信用发票-1
中获得-ve
结果后,我得到了一个; expected
错误指示器,它跳到它之后的程序。
这可能是一个非常愚蠢的错误,但目前我无法解决这个问题。评论新的 ifclause 将解决这个问题,所以它就是这样。
procedure FooterSR1OnBeforePrint(Sender: TfrxComponent);
begin
if ( <frxdsqryKopfdaten."MwStNichtAusweisbar"> = 0 ) then
mmoBrutto.Memo.Text := FormatFloat('#,##0.00', EndBrutto ) + ' ' + <frxdsqryKopfdaten."CurrencyString">
else
mmoBrutto.Memo.Text := FormatFloat('#,##0.00', EndNetto ) + ' ' + <frxdsqryKopfdaten."CurrencyString">;
end;
procedure Hauptkopf1OnBeforePrint(Sender: TfrxComponent);
begin
if (<frxdsqryArt."Art"> = 'Gutschrift') then
begin
EndNetto := EndNetto * (-1)
end else begin
EndNetto := EndNetto;
end;
end;
begin
mmoNetto.Memo.Text := FormatFloat('#,##0.00', EndNetto ) + ' ' + frxdsqryKopfdaten."CurrencyString">
end;
procedure BandBankOnBeforePrint(Sender: TfrxComponent);
begin
if <frxdsqryFirma."Bank1"> <> '' then
mmoBank.Visible := False
else
mmoBank.Visible := FALSE;
if <frxdsqryFirma."IBAN1"> <> '' then
begin
mmoIBAN.Visible := FALSE;
mmoBank.Visible := FALSE;
mmoBank.Height := 0
end else begin
mmoIBAN.Visible := FALSE;
mmoBank.Visible := FALSE;
end;
end;
解决方案
这是错误的(4× begin
,但只有 3× end
):
procedure Hauptkopf1OnBeforePrint(Sender: TfrxComponent);
begin
if (<frxdsqryArt."Art"> = 'Gutschrift') then
begin
EndNetto := EndNetto * (-1)
end else begin
EndNetto := EndNetto;
end;
end;
begin
mmoNetto.Memo.Text := FormatFloat('#,##0.00', EndNetto ) + ' ' + frxdsqryKopfdaten."CurrencyString">
end;
你可能想要这个(但很难说):
procedure Hauptkopf1OnBeforePrint(Sender: TfrxComponent);
begin
if (<frxdsqryArt."Art"> = 'Gutschrift') then
begin
EndNetto := EndNetto * (-1)
end else begin
EndNetto := EndNetto;
end;
end;
mmoNetto.Memo.Text := FormatFloat('#,##0.00', EndNetto ) + ' ' + frxdsqryKopfdaten."CurrencyString">
end;
推荐阅读
- kubernetes-helm - Spring Data Flow Helm 图表:有没有办法在 helm 图表中声明应用程序和任务的创建?
- python - 'NoneType' 对象在使用 beautifulsoup 进行网络爬行时没有属性'text'
- graphql - 嵌套列表中子字段的 GraphQL 模式
- kotlin - 对象和伴随对象之间的区别以及如何测试它们
- visual-studio-code - vscode + latex-workshop中的非标准编译快捷方式
- ios - 复制 Snapchat 键盘行为
- python - 需要帮助将列时间戳数据转换为 2 个单独的列(日期、时间)
- vue.js - 以编程方式检查 ag-grid 复选框
- catboost - 如何解决安装 catboost gpu 时出现的错误?
- xslt - 指定 xslt 的输出格式