editable report on line manual

(19 posts) (4 voices)
  • Started by vittorio
  • Latest reply from sanchechin18@hotmail.com

Tags:

No tags yet.

  1. vittorio, Member

    all

    can I have support re to
    Editable reports
    Commands

    dbr.editable - Set column to be editable
    Syntax

    select 'dbr.editable', column, procedure_name, [parameter_name=paramref]

    I found personally a big lack of details in the editabel report section where the description of the commands to create , recall the stored procedure for the update of the cell does not report how to do this. there is no example and the demo does not respond to the manual.

    please provide detailed documentation on meaning of the

    1. [parameter_name=paramref] : MEANING
    2. how the procedure_name sructure has to be with three examples.

    thanks

  2. myDBR Team, Key Master

    Please see the documentation on editable reports.

    See the In-place editing example:

    Getting started -> Creating editable reports

    --
    myDBR Team

  3. vittorio, Member

    dear sirs

    we have this link and we went through the documentation, poor quality

    what is obscure is

    select 'dbr.editable', 4, 'sp_DBR_update_crosstable', 'inCategory=5', 'inWeek=2';

    the working and code that brings to this string.

    how you can set up parameters [parameter_name=paramref]??

    can you provide one good short but clear example of report with clear reference to the parameters?

    we have to fix things urgently.

    thanks

    thanks

  4. myDBR Team, Key Master

    how you can set up parameters [parameter_name=paramref]??

    Hi,
    the syntax of editable report is the same as in the linked report. See report linking.

    In order to edit a column we need a procedure that does the editing and we need to pass the ID's and values of the item user chooses to edit. dbr.editable gets the editing procedure as a parameter along with the parameters. 'parameter_name' refers to editable report's parameters and 'paramref' is a reference to the resultset (if positive) or a reference to reports own parameters (if negative).

    So 'inCategory=5' means that sp_DBR_update_crosstable's inCategory parameter get's the value from the fifth column from the result set user clicks to.

    can you provide one good short but clear example of report with clear reference to the parameters?

    Editable command

    --
    myDBR Team

  5. vittorio, Member

    can you tell me where the below code is wrong

    select 'dbr.text','

    select 'dbr.editable', 4, 'sp_DBR_update_xxxx_xxxxx','inamount>=4';

    select p.country as 'Country',
    p.location as 'Location',
    p.currency as 'Currency',
    p.amount as 'Amount',
    p.Comments as 'Comments'

    I DO NOT UNDERSTAND IF inamount =4 is right because the Field do not come editable.
    I DO NTO UNDERSTAND IF THE dbr.editable has to be before the "select" command or not.

    PLEASE ADVISE

    THANKS

  6. vittorio, Member

    do the variables in the recalled update procedure have a IN-xxx prefix or does not really matter?

    do they have to be same name of the fields listed in the main procedure.

    thanks

  7. myDBR Team, Key Master

    Hello,

    As explained in the documentation Getting Started -> Creating editable reports, there are two ways to edit data.

    The first one is to edit the data in place, which should be used when you only have to change the value of a single column. The other one should be used when you want to update more than one column at a time.

    Like with all other myDBR commands, the dbr.editable has to come before the actual data.

    The parameters that the procedure receives are as you name them in the dbr.editable line. In addition when you use in-place editing, the procedure will receive one extra parameter with the value of the data to be edited. This parameter will be added automatically by myDBR and can be named anything you like.

    Please refer to the example code found at the above link for further details.

    Best Regards,

    myDBR Team

  8. vittorio, Member

    thanks

    My query is :

    do we have to specify as in your link :

    select 'dbr.report', 'sp_DBR_film_edit', 2, 'inID=1', 'inTitle<=2', 'inYear<=3', 'inDescription<=4';

    in ID=1 as a reference ID for any report?

    what is the meaning of = or <=? EDITABLE, NON EDITABLE?

    are In ID and In title parameters opened in the update procedure to be recalled in the report?.

    thanks

  9. myDBR Team, Key Master

    Hello,

    Any parameters that you specify with "<=" will be editable by the user, all other parameters will be fixed and would normally be used to identify the row to edit.

    As always you specify the report that you want to link to, either for editing or displaying data, by the name of the stored procedure, sp_DBR_file_edit in the above case.

    Best Regards,

    myDBR Team

  10. vittorio, Member

    can I have the meaning of the below

    'inCategory=5', 'inWeek=2';

    in your string.

    is this the crossing of the vlaue that can be editable called INVALUE?

    What I need is:

    select 'dbr.editable', 5, 'sp_DBR_GENP_forfait','inamount=5';

    having 5th column containing inamount editable.

    please confirm is correct.

  11. vittorio, Member

    we shall also need evidence of the procedure stored in the editable report code to hav e a clear understanding

    -- Make columns editable
    17.select 'dbr.editable', 4, 'sp_DBR_budget_edit', 'inID=6', 'inQuarter=2', "options={'height':15, 'callback':autosum_int}";
    18.select 'dbr.editable', 5, 'sp_DBR_budget_edit_comment', 'inID=6', 'inQuarter=2',"options={'type':'textarea','rows':6,'cols':20}";

    FOR INSTANCE

    sp_DBR_budget_edit' and sp_DBR_budget_edit_comment.

    can you provide code of those two?
    thanks

  12. vittorio, Member

    I've notbeen probably clear enough. however going through your demo reports I find the manual with big lack of details .

    for instance below

    select 'dbr.editable', 4, 'sp_DBR_budget_edit', 'inID=6', 'inQuarter=2', "options={'height':15, 'callback':autosum_int}";

    what is the meaning of

    EDITABLE COLUMN: 4? pls confirm
    InID=6: (tables details are not provided os obscure meaning of inID and =6?
    what is it 6? no. of column or what? why no >= but only =.
    -----------------
    inQuarter=2 what is the meaning of this code?
    ---------------

    "options={'height':15, 'callback':autosum_int}";

    what is the meaning?

    detailing this will make me able to create other editable reports aware of what I'm doing.

    thanks

  13. sanchechin18@hotmail.com, Member

    good aftermoon
    I write because i dont understand so much the documentation.

    someone could you help me?

    I like to do the reports where i can to update the information

    I see in the documentation that

    select 'dbr.report', 'sp_DBR_Film_upd', '[Edit]', 'popup', 'inFilm_id=film_id',
    'inTitle<=Title', 'inDescription<=Description', 'inRelease_year<=Year', 'inCategory_id<=category_id',
    'inDirector<=Director', 'inDirector_id<=director_id';

    my code is:
    ######################################
    DROP PROCEDURE IF EXISTS sp_DBR_parrilla_editable
    $$
    CREATE PROCEDURE `sp_DBR_parrilla_editable`()
    BEGIN

    select 'dbr.report', 'sp_DBR_parrilla', '[Edit]', 'popup', 'Nombre=_Nombre',
    'idUsuario<=_idUsuario';

    END
    $$
    ######################################

    sp_DBR_parrilla:
    #############################################
    DELIMITER $$

    USE `mydbr`$$

    DROP PROCEDURE IF EXISTS `sp_DBR_parrilla`$$

    CREATE DEFINER=`management`@`%` PROCEDURE `sp_DBR_parrilla`(
    _Nombre VARCHAR(255)
    )
    BEGIN

    UPDATE Usuarios
    SET Nombre=_Nombre
    WHERE idUsuario=1;

    SELECT 'dbr.refresh';

    END$$

    DELIMITER ;
    #############################################

    the result in white, i can see nothing.

    please, someone could you help me ?'

  14. myDBR Team, Key Master

    The dbr.report command is put before the result set that is shown to the user (so that user can pick which row s/he wants to edit).

    So if you want to edit Usuarios-rows and let user pick which row to edit, you would show the result and show which column is the ID and which value you wish to edit

    CREATE PROCEDURE `sp_DBR_parrilla_editable`()
    BEGIN select 'dbr.report', 'sp_DBR_parrilla', '[Nombre]', 'popup', 'in_id_usuario=idUsuario', 'in_nombre<=Nombre'; select idUsuario, Nombre
    from Usuarios; END

    myDBR would then ask the Nombre from the user via popup and pass the id and the name value into the sp_DBR_parrilla, so sp_DBR_parrilla would look like this:

    CREATE sp_DBR_parrilla(
    in_id_usuario int,
    in_nombre VARCHAR(255)
    )
    BEGIN UPDATE Usuarios
    SET Nombre= in_nombre
    WHERE idUsuario= in_id_usuario; SELECT 'dbr.refresh'; END

    Note that if you just update one column, you can use dbr.editable, which makes the cell directly editable:

    CREATE PROCEDURE `sp_DBR_parrilla_editable`()
    BEGIN select 'dbr.editable', 'Nombre', 'sp_DBR_parrilla', 'in_id_usuario=idUsuario'; select idUsuario, Nombre
    from Usuarios; END

    In dbr.editable you do not need to pass the in_nombre parameter as myDBR will do that automatically and nor do you need to do dbr.refresh in editing report.

    CREATE sp_DBR_parrilla(
    in_id_usuario int,
    in_nombre VARCHAR(255)
    )
    BEGIN UPDATE Usuarios
    SET Nombre= in_nombre
    WHERE idUsuario= in_id_usuario; END

    --
    myDBR Team

  15. sanchechin18@hotmail.com, Member

    thank you for answer me

    I wrote the first opcion, for edit different columms.

    In the report Listado I associate the process sp_DBR_parrilla_editable with de next information:

    DROP PROCEDURE IF EXISTS sp_DBR_parrilla_editable
    $$
    CREATE PROCEDURE `sp_DBR_parrilla_editable`()
    BEGIN
    select 'dbr.report', 'sp_DBR_parrilla', '[Nombre]', 'popup', 'in_id_usuario=idUsuario', 'in_nombre<=Nombre';

    select idUsuario,Nombre
    from DefUsuarios
    WHERE idUsuario = 1;
    END
    $$

    and later I created the process sp_DBR_parrilla, with the next information:

    DELIMITER $$

    USE `mydbr`$$

    DROP PROCEDURE IF EXISTS `sp_DBR_parrilla`$$

    CREATE DEFINER=`management`@`%` PROCEDURE `sp_DBR_parrilla`(
    in_id_usuario INT,
    in_nombre VARCHAR(255))
    BEGIN

    UPDATE DefUsuarios
    SET Nombre= in_nombre
    WHERE idUsuario= in_id_usuario;

    SELECT 'dbr.refresh';

    END$$

    DELIMITER ;

    when execute the report, I can see the informaticion of the user 1. I see the idUsuario and Nombre.

    But when I do click about the name, I haven't pop for change the name.

    Could you tell me if I need add something more for this opcion?

    best regards

  16. myDBR Team, Key Master

    The code looks ok, other than that your main report (sp_DBR_parrilla_editable) limits the list to just one user (id=1). This of course can be what you meant.

    Have you added sp_DBR_parrilla as a myDBR report? Do you see the link generated for the Nombre-column (an underline)?

    If you are just updating a name from the list, the dbr.editable would be more convenient as user can edit the name directly and there would be no need for refreshing the page.

    --
    myDBR Team

  17. sanchechin18@hotmail.com, Member

    hi

    sp_DBR_parrilla only I have the process in the database of myDBR,
    sp_DBR_parrilla_Editable I have in the myDBR report.

    I am limit to one, only beacuse it is a proof, if it is ok, I will put all the users.

  18. myDBR Team, Key Master

    When you put the actual editing report (in your case sp_DBR_parrilla) in as myDBR report, myDBR will check if the user running the main report has access to the linked report and if they do, myDBR will show the link.

    --
    myDBR Team

  19. sanchechin18@hotmail.com, Member

    hi
    ok now it is correct
    thank you so much


Reply

You must log in to post.