...
IF AnalysisLine.GETFILTER("Source No. Filter") <> '' THEN
CASE FilterToValue(AnalysisLine) OF
AnalysisLine."Source Type Filter"::Customer:
BEGIN
SETRANGE("Source Type Filter","Source Type Filter"::Customer);
// Delete the following lines.
AnalysisLine.COPYFILTER("Source No. Filter","Source No. Filter");
END;
AnalysisLine."Source Type Filter"::Vendor:
BEGIN
SETRANGE("Source Type Filter","Source Type Filter"::Vendor);
AnalysisLine.COPYFILTER("Source No. Filter","Source No. Filter");
END;
AnalysisLine."Source Type Filter"::Item:
AnalysisLine.COPYFILTER("Source No. Filter","Item Filter");
// End of the lines.
END;
IF AnalysisLineTemplate."Item Analysis View Code" = '' THEN BEGIN
IF GETFILTER("Global Dimension 1 Filter") = '' THEN
AnalysisLine.COPYFILTER("Dimension 1 Filter","Global Dimension 1 Filter");
IF GETFILTER("Global Dimension 2 Filter") = '' THEN
...
...
IF AnalysisLine.GETFILTER("Source No. Filter") <> '' THEN
CASE FilterToValue(AnalysisLine) OF
AnalysisLine."Source Type Filter"::Customer:
BEGIN
SETRANGE("Source Type Filter","Source Type Filter"::Customer);
// Add the following lines.
SETFILTER("Source No. Filter",GetSourceNoFilter(ItemStatisticsBuf,AnalysisLine));
END;
AnalysisLine."Source Type Filter"::Vendor:
BEGIN
SETRANGE("Source Type Filter","Source Type Filter"::Vendor);
SETFILTER("Source No. Filter",GetSourceNoFilter(ItemStatisticsBuf,AnalysisLine));
END;
AnalysisLine."Source Type Filter"::Item:
SETFILTER("Item Filter",GetSourceNoFilter(ItemStatisticsBuf,AnalysisLine));
// End of the lines.
END;
IF AnalysisLineTemplate."Item Analysis View Code" = '' THEN BEGIN
IF GETFILTER("Global Dimension 1 Filter") = '' THEN
AnalysisLine.COPYFILTER("Dimension 1 Filter","Global Dimension 1 Filter");
IF GETFILTER("Global Dimension 2 Filter") = '' THEN
...