[Obsolete('Event will be removed in a future release', '27.0')]
[EventSubscriber(ObjectType::Report, Report::"VAT Report Request Page", 'OnBeforeVATStatementLineFindSet2', '', false, false)]
local procedure OnBeforeVATStatementLineFindSet2(VATStatementLine: Record "VAT Statement Line"; VATReportHeader: Record "VAT Report Header"; var IsHandled: Boolean)
var
GovTalk: Codeunit GovTalk;
begin
if GovTalk.IsEnabled() then
exit;
IsHandled := true;
if VATStatementLine.Count() <> 9 then
Error(WrongVATSatementSetupErr, VATReportHeader."Statement Template Name", VATReportHeader."Statement Name");
end;
I see no reason why VATStatementLine.Count would not be 9 but it clearly isn't? Any help would be greatly appreciated?