Editable report error

(3 posts) (2 voices)
  1. -nth-, Member

    I think I understand the concept of the in place editable report. However I'm stuck on an error.

    My main report calls an editable report with the following:


    select 'dbr.editable', 8, 'sp_DBR_TrackingUpdate', 'ServiceID=11', 'TranID=1', 'type=radiobutton', 'select= select ''YES'' union select ''NO''';

    The code for the sp_DBR_TrackingUpdate is:

    CREATE PROCEDURE [dbo].[sp_DBR_TrackingUpdate] @ServiceID varchar(50), @TranID varchar(50), @inValue varchar(3), @inLogin varchar(30)
    AS
    BEGIN
    /* Accept the update, no need to return a value */
    update mydbr__Data..Tracking
    set Received = @inValue
    set UserID = @inLogin
    where ServiceID = @ServiceID and TranID = @TranID;
    select 'dbr.refresh', 0;
    END
    GO

    When I run the main report I get an error stating "Edit report 'sp_DBR_TrackingUpdate' requires parameter 'inValue', which was not supplied. Column 8 will not be editable."
    I've tried moving parameters around, but it still errors out on either the inValue or inLogin parameters. I was thinking that I didn't need to supply the value for these... that they would be automatically populated. Am I missing something?

    Thanks,
    -nth-

    P.S. May I recommend that a list of all internal mydbr parameters be added to the documentation along with an explanation of their usage? It would be handy to know what "reserved" parameters are available (like inLogin, inValue, inUserValue, etc.).

  2. myDBR Team, Key Master

    Few notes here:

    1) The inLogin automatic parameter is not supported in 'dbr.editable'. You need to include it to query and make normal reference to it. You can hide it from the query output with dbr.hidecolumns

    2) Current version does not like the space before the select query i.e

    'select= select ''YES'' union select ''NO''
    should be:
    'select=select ''YES'' union select ''NO''

    3) In the update-proceudure, the updated value needs to be the last parameter. You can name it to whatever you like. No need to use "inValue" if you prefer something else.

    4) You most likely do not need the 'dbr.refresh' in updateable since your report will already show the new value

    5) The update syntax should be of form:

    update mydbr__Data..Tracking
    set Received = @inValue, UserID = @inLogin

    i.e no repetitive "set"

    As for the "reserved" parameters, in current version the only reserved one is "inLogin".

    --
    myDBR Team

  3. -nth-, Member

    Thanks so much! Those suggestions did the trick!


Reply

You must log in to post.