dbr.button seems to hide next select statement.

(2 posts) (2 voices)
  1. Aardvark, Member

    I'm currently using dbr.report followed by dbr.button so that the user sees a selectable button to run a report.

    Currently for some reason the next select after these two fields is hidden and I have to put an empty select afterwards for this to work.

    e.g.

    SELECT 'dbr.report','sp_DBR_Delete_All_Old_Users';
    SELECT 'dbr.button','Delete All Users Marked as Old';

    SELECT users from users;

    In this example the userstable results won't appear and I currently having to do the following:

    SELECT 'dbr.report','sp_DBR_Delete_All_Old_Users';
    SELECT 'dbr.button','Delete All Users Marked as Old';
    SELECT '';

    SELECT users from userstable;

    This didn't use to be an issue so I'm not sure if I've done something to change this feature. Could someone confirm why it's doing this?

  2. myDBR Team, Key Master

    Hi,
    the dbr.report-command is attached to a result set i.e. the next result set is combined with it.

    So if you have a code:

    SELECT 'dbr.report','sp_DBR_Delete_All_Old_Users';
    
    SELECT users from users;

    it will produce a list of users and same report is attached to each of the rows as the linked report does not have any parameters.

    If you use dbr.button

    SELECT 'dbr.report','sp_DBR_Delete_All_Old_Users';
    SELECT 'dbr.button','Delete All Users Marked as Old'; SELECT users from users;

    it will produce a button for each user (again with same report for each).

    If you want to have an user list *and* a separate button, you give the linked report a result set:

    SELECT 'dbr.report','sp_DBR_Delete_All_Old_Users';
    SELECT 'dbr.button','Delete All Users Marked as Old';
    SELECT 'whatever result set for the dbr.report if you do not pass parameters to dbr.report'; SELECT users from userstable;

    --
    myDBR Team


Reply

You must log in to post.