Inventory Valuation Report 1001

I used report from NAV 2017 - R1001 - Inventory Valuation, to create a new report that could group by location. Because in the original report i can take the results of all Locations or filter by a specific.

My goal is to show all locations .

I added Location as Data Item, and indented Item , and dataitemlink by Code - Location Filter

Then in Code replaced :

//ValueEntry.SETFILTER(“Location Code”,GETFILTER(“Location Filter”));
ValueEntry.SETFILTER(“Location Code”,Location.Code);

//ItemLedgEntry.SETFILTER(“Location Code”,Item.GETFILTER(“Location Filter”));
ItemLedgEntry.SETFILTER(“Location Code”,Location.Code);

The original map takes about 2 minutes for all data, tis new map cant generate at all no data(20 minutes nd nothing). Except if i put some filters before generate the report, for example one location or one item.

What i am missing here?

Thanks for help