Delete row with multiple parameters

(6 posts) (2 voices)

Tags:

No tags yet.

  1. Nithin, Member

    select 'dbr.report', 'sp_DBR_deleteAssociation', '[Delete]', 'scriptdiv[]', 'inClntId=ClntID', 'inCmpId=(CmpID)', 'event=click', 'callbefore=confirmdel';

    I'm using the following command to delete a row passing multiple parameters - ClntID, CmpID. I've tried various options based on my understanding of linking reports using multiple parameters. However, none of them worked out.

    It would be of great help if the mistake is pointed out from the above line.

  2. myDBR Team, Key Master

    Hi,
    nothing wrong with the command itself. What happens when you access the linked report?

    1) Does your result set have a column called "Delete"?
    2) Does your result set have a column called "ClntID"?
    3) Does your report have a parameter "CmpID"?
    4) Do you have a JavaScript function called "confirmdel"?

    --
    myDBR Team

  3. Nithin, Member

    Yes..It has all the above things...the code looks like this

    CREATE PROCEDURE sp_DBR_manageClientCampaignMap()
    BEGIN

    select 'dbr.javascript',
    "
    function confirmdel(obj)
    {
    return confirm('Delete film \\''+$(obj).parent().children().eq(0).text()+'\\'?');
    }";

    select 'dbr.report', 'sp_DBR_deleteClntCmpAssoc', '[Delete]', 'scriptdiv[]', 'inClntID=ClntID', 'inCmpID=(CmpID)', 'event=click', 'callbefore=confirmdel';
    select 'dbr.colstyle', 'Delete', '[color:gray;]';

    select ClntID, ClientName, CmpID, '[Delete]'
    from
    mydatabase.mobc_table1 left join
    mydatabase.mobc_table2 using(ClntID) left join
    mydatabase.mobc_table3 using(CmpID);

    END
    $$

    Behavior:

    When I click delete...looks like the procedure is called but nothing happens.

  4. Nithin, Member

    Hi..It is now working...I removed the braces around 2nd parameter and it magically works...

    Thanks for the support.

  5. myDBR Team, Key Master

    When you are using parentheses, like in 'inCmpID=(CmpID)', it means that the CmpID should be a input parameter for the main report (sp_DBR_manageClientCampaignMap in). When you remove them, it refers to column in your result set.

    --
    myDBR Team

  6. Nithin, Member

    Thanks for the clarification.


Reply

You must log in to post.