Weekly & Monthly auto inventory exports

Hi and thank you for the forum, it’s been very helpful :slight_smile:

One thing that I can’t figure out, though, is how to generate a weekly and a monthly inventory report as a csv file. The Action with the date range ‘Work Period’ works perfectly but when I set it to ‘This Week’ for instance it only exports the same ‘Work Period’ data. The rule and the trigger once a week work fine. I can’t figure out what I’m missing, would you mind having a look?

Here’s the Action:
image

And here’s the export’s code:

WEEKLY INVENTORY REPORT
WAREHOUSE,START DATE,END DATE,ITEM,PRICE,UNIT,IN STOCK,PURCHASE,PURCHASE COST,CONSUMPTION,CONSUMPTION COST,INVENTORY,INVENTORY VALUE
[Report:1,1,1,1,1,1,1,1,1,1,1,1,1]
@CELLAR


{REPORT CONSUMPTION DETAILS:
C.Warehouse,
C.StartDate,
C.EndDate,
C.Name,
C.Cost,
C.Unit,
C.InStock,
C.Added,
[C.Cost]*[C.Added],
C.Removed,
[C.Cost]*[C.Removed],
C.Inventory,
[C.Cost]*[C.Inventory],
:(PCW=$1)
:{0},{1},{2},{3},"{4}",{5},{6},{7},"{8}",{9},"{10}",{11},"{12}"}

,,,,,,,,=SUM(I3:I<row-1>),,=SUM(K3:K<row-1>),,=SUM(M3:M<row-1>)