Dear Team
I have editable report that display 16 week. However, in the data table we have only data for the current week. When I edit value in the next week, the editable return an error
"Column 'TimeStampID' cannot be null
SQL: call sp_DBR_inputBacklog(8,10,24,null,1);"
How can I disable inputting value for the future week and let user only change value in the current week and past week?
My code is below
set TmpTimeStampID = TmpTimeStampID_Start;
set @i = 0;
-- create 16 week
while (@i < 16) do
select 'dbr.crosstab.col', fap_woi.getTimeStampDesc(TmpTimeStampID);
select ts.TimeStampID into TmpTimeStampID
from fap_woi.TimeStamp
ts
where ts.TimeStampID > TmpTimeStampID
order by ts.TimeStampID asc
limit 1;
set @i = @i + 1;
end while;
select 'dbr.hdr', 'Category';
select 'dbr.sum', '[Qty]';
select 'dbr.crosstab', 'WeekName';
select 'dbr.hidecolumn', 'Week';
select 'dbr.hidecolumn', 'ItemID';
select 'dbr.column.filter', 'Category', 'select';
select 'dbr.column.filter', 'Storage', 'select';
select 'dbr.column.filter', 'Colour', 'select';
select 'dbr.subtitle', 'Log';
select 'dbr.editable', 'Qty', 'sp_DBR_inputBacklog', 'ItemDataTypeID="8"', 'DealerID="10"', 'ItemID=ItemID', 'TimeStampID=Week', 'Qty=Qty', "options={'callback':autosum_int}";
call fap_woi.MyDBR_LoadData(8, fap_woi.getTimeStampID(now()), 10, 2, '', '');