Linked report to appear on same page as button

(4 posts) (2 voices)
  1. KymWade, Member

    Hi,

    I have a button that opens a linked report. I would like the report to be embedded and appear on the same page as the button. At the moment it keeps opening in a popup window. Below is the code I am using.

    CREATE PROCEDURE sp_DBR_TreeView (@inLogin varchar(30))
    AS
    BEGIN
    select 'dbr.title', '';

    SELECT * FROM [f_rrt000001RoscoProjects](@inLogin)
    ORDER BY intechSort1, intechSort2, intechSort3

    select 'dbr.report', 'sp_dbr_9999999997_115384_select','home','inViewType=''datasheet''';
    select 'dbr.button', 'Run Rosco Projects';
    select 'dummy'

    select 'dbr.embed_object','home';
    END

    CREATE PROCEDURE [dbo].[sp_dbr_9999999997_115384_select]
    @inLogin varchar(30), @inViewType nvarchar(255)
    AS
    BEGIN
    SELECT 'dbr.title', '9999999997.115384'
    SELECT 'dbr.resultclass', 'stickyheader';
    IF @inViewType = 'page'
    SELECT 'dbr.pageview';

    SELECT * FROM [f_rrt000001RoscoProjects](@inLogin)
    ORDER BY intechSort1, intechSort2, intechSort3

    END

    What changes are needed to have it appear in the same window. We are currently using the community version but will be upgrading to the full version after we have completed our testing.

    Kym

  2. myDBR Team, Key Master

    The code looks ok. If you are passing constants like the "datasheet", make sure you put them in double quotation marks. (In the example you have single ones.

    select 'dbr.report', 'sp_dbr_9999999997_115384_select','home','inViewType="datasheet"';

    --
    myDBR Team

  3. KymWade, Member

    Yes the code all works except that the sp_dbr_9999999997_115384_select report which is opened when the button is pushed opens in a separate popup window. Does the embeded_target need to be defined anywhere else? the name 'home' is not defined anywhere except in the code where you see it above. Is this correct? Are there any other properties of the sp_dbr_9999999997_115384_select report that could be causing it to open in its own popup window rather than in the same page?

    This is a MS SQL BE install so datasheet needs to have 2 single quote marks on either side. The parameter seems to be passed correctly.

    Thanks

  4. myDBR Team, Key Master

    Looking closer at this. Community version does not after all support embedded elements.

    The MS SQL BE should not make a difference for the quotation marks. The purpose is to produce a string [inViewType="datasheet"] (excluding brackets) so myDBR can parse the constant.

    --
    myDBR Team


Reply

You must log in to post.