How to check null value of Column in dbr.editable

(2 posts) (2 voices)

Tags:

No tags yet.

  1. TrungNS, Member

    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, '', '');

  2. myDBR Team, Key Master

    The example code does not show the actual data being edited (behind the fap_woi.MyDBR_LoadData procedure) nor the actual editing (behind the sp_DBR_inputBacklog procedure), but you can either limit the data only to weeks that user can edit or add CSS class 'no_edit' to those cells (using dbr.cellclass) that user should not edit.

    --
    myDBR Team


Reply

You must log in to post.