trouble with editable reports (using radio buttons)

(4 posts) (2 voices)

Tags:

No tags yet.

  1. JMitchell, Member

    I have a report that i need to have multiple editable fields per line.

    I am having to use radio buttons because check boxes are supported.

    main report:

    select 'dbr.editable', 'Email', 'sp_DBR_uwupdate1', 'uwid=iduw_journal', 'type=radiobutton', 'sp_DBR_radiochoice';

    select client_app_id as 'Client ID'
    , client_email as 'Email'
    , iduw_journal
    from x.uw_journal;

    update report:

    CREATE PROCEDURE sp_DBR_uwupdate1( uwid int, vch int)
    BEGIN

    update dw_auto.uw_journal
    set client_email = vch
    where iduw_journal = uwid;

    sp_DBR_radiochoice:

    CREATE PROCEDURE sp_DBR_radiochoice()
    BEGIN

    select radio_id, descr from mydbr.radio_choice;

    radio_choice looks like:
    radio_id - descr
    ----------------
    0 - 'No'
    1 - 'Yes'

    What I want the user to be able to do is click on the EMAIL field in the main report and
    have the option to select 'Yes' or 'No'. A check box would be the best option. But my report keeps returning "Do not understand paramerer 'sp_DBR_radiochoice" (yes parameter is misspelled in the error).

    Please advise!

  2. myDBR Team, Key Master

    Hi,
    the sp_DBR_radiochoice parameter should be of form "select=sp_DBR_radiochoice". It is an error in the manual, we'll fix it (alongside the spelling error in the error message).

    As your client_email-field can only contain 1 or 0 (Yes/No), another option is to use the "Click on cell" option in dbr.report. See example in demo.

    --
    myDBR Team

  3. JMitchell, Member

    thank you, where in the demo is this?

    also i have 6 fields that are all 1's and 0's. Is there a way to make them say Yes for 1 and No for 0? without setting each field in the query?

    ie a MyDBR way to "select if(field = 1, 'Yes','No')" built in?

  4. myDBR Team, Key Master

    See the link for the online demo.

    To make the query bit more readable, you can always use a function to convert number to yes/no text.

    --
    myDBR Team


Reply

You must log in to post.