dbr.url in new window

(3 posts) (2 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;

    Posted 2 years ago #
  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

    Posted 2 years ago #
  3. Adrian, Member

    perfect - thanks!

    Posted 2 years ago #

Reply

You must log in to post.