dbr.url in new window

(7 posts) (3 voices)

Tags:

  1. Adrian, Member

    Is it possible to open the url in a new tab/windows? (<a target='_blank' ...)

    Example from Docs.

    create procedure sp_DBR_myreport(
    inCategory int
    )
    begin
    select 'dbr.url', 'http://myserver.com/myservice', '', 1, 'c=-1', 'p=product_id';

    select name, product_id
    from mydb.products
    where category=inCategory;

  2. myDBR Team, Key Master

    Sure,
    you can use the target parameter ('new_window'):

    select 'dbr.url', 'http://myserver.com/myservice', '', '[name]', 'new_window',  'c=(inCategory)', 'p=product_id';
    
    select name, product_id
    from mydb.products
    where category=inCategory;

    Will produce URL

    http://myserver.com/myservice?c=3&p=2

    when your inCategory = 3 and the row's product_id = 2;

    You might want to try to avoid numeric references and use the ColumnReference instead. Makes reading and modifying the reports easier.

    --
    myDBR Team

  3. Adrian, Member

    perfect - thanks!

  4. shery, Member

    Hi,

    Can we open the External Link in a popup?
    I have a popup report, now I want to place external link and want it to be opened in the new popup remaining in the same tab.

    How can we achieve this?

    Here is what I have tried but not working.

    1- SELECT 'dbr.url', 'http://link', 'popup', '[Property]';

    2- SELECT 'dbr.url', 'http://link', 'new_popup', '[Property]';

    Regards

  5. myDBR Team, Key Master

    Hi,
    you cannot open an external URL directly to a popup as the popup is not really a separate window, but a fixed position element in the page.

    You could do similar thing by opening the external page in a iframe which would be in a popup. The user experience of such might not be what you want though.

    --
    myDBR Team

  6. shery, Member

    Hi, Thank you for the prompt response.

    Can you please specify how I can use iframe to achieve this in myDBR, I am unaware of it.

    Regards,

  7. myDBR Team, Key Master

    See a sample.

    --
    myDBR Team


Reply

You must log in to post.