Posted By: mikevtss — 28 Jun 2016 at 1:07pm
Hello all,
So i have grouped a data field to group the data by monthly transactions.
But I want to change the Grouping name field from the default display of just the month and year {05/2016}
Is it possible to have a formula to have the group name display as the month date range.
eg.
01/05/16 to 31/05/16
(May Transactions)
01/06/16 to 30/06/16
(June Transactions)
any help will be appreciated.
Posted By: DBlank — 29 Jun 2016 at 8:00am
select the group group field
right click and select format field
select common tab
select formula button for 'Display String' option
NumberVar y;
NumberVar m;
DateVar firstday;
DateVar lastday;
StringVar t;
y:= YEAR((Minimum ({table.TransactionDate}, {table.TransactionDate}, "monthly")));
m:= MONTH((Minimum ({table.TransactionDate}, {table.TransactionDate}, "monthly")));
firstday:=DATESERIAL(y,m,1);
lastday:=DATESERIAL(y,m+1,1-1);
t:= TOTEXT(firstday,'d/M/yy') + ' to ' + TOTEXT(lastday,'d/M/yy')
Posted By: mikevtss — 29 Jun 2016 at 3:54pm
Thank you DBlank! works a dream!