所以我试图在报告中显示我的变量值。但它打印在消息“Numerario”但在报告中没有显示任何内容..
我更改了代码并插入下面的触发器,但报告没有在页面中打印消息
卡斯特。 Ledger Entry - OnAfterGetRecord()
Cust.GET("Customer No.");
FormatAddr.Customer(CustAddr,Cust);
IF NOT Currency.GET("Currency Code") THEN
Currency.InitRoundingPrecision;
IF "Document Type" = "Document Type"::Payment THEN BEGIN
ReportTitle := Text003;
PaymentDiscountTitle := Text006;
END ELSE BEGIN
ReportTitle := Text004;
PaymentDiscountTitle := Text007;
END;
CALCFIELDS("Original Amount");
RemainingAmount := -"Original Amount";
Signature := ReportCertificate + CompanyInfo."Soft. Certificate Number" + ReportCode;
IF "Cust. Ledger Entry"."Payment Method Code"= '' THEN
PaymentMethod.INIT
MESSAGE('Empty Payment Method Code');
END ELSE BEGIN
PaymentMethodCode:="Cust. Ledger Entry"."Payment Method Code";
PaymentMethod.GET(PaymentMethodCode);
PaymentMethodDescription:=PaymentMethod.Description;
Message('PaymentMethodCode %1',"Cust. Ledger Entry"."Payment Method Code");
END;
我的var PaymentMethodDescription具有“包含在数据集中为真”的选项
答案 0 :(得分:0)
您在OnPostReport上设置变量,但尝试在数据集的第一条记录的标题中打印它。它还没有。
答案 1 :(得分:0)
IF "Cust. Ledger Entry"."Payment Method Code"= '' THEN
PaymentMethod.INIT
MESSAGE('Empty Payment Method Code');
END ELSE BEGIN
PaymentMethodCode:="Cust. Ledger Entry"."Payment Method Code";
PaymentMethod.GET(PaymentMethodCode);
PaymentMethodDescription:=PaymentMethod.Description;
Message('PaymentMethodCode %1',"Cust. Ledger Entry"."Payment Method Code");
END;