Linked reports

(4 posts) (2 voices)

Tags:

  1. situ, Member

    Hi,

    With the number of reports I have rapidly increasing I would like improve the way I manage the volume of reports. Some of these reports are very similar.

    I would like to merge two similar reports together into a single procedure and based on the calling procedure (parent) make some small changes on the report output (for example include an extra column).

    If I were to be able to pass the parent procedure name into the child report I could do this.

    Is there a way to pass the parent procedure name to a linked report?
    Thanks

  2. myDBR Team, Key Master

    Sure,
    you can use a parameter which you populate with the parent procedure name (or with other identification). To populate the parameter, you can use normal column reference or if you are on latest version, you can use the new constant reference:

    select 'dbr.report', 'sp_DBR_mylinkedreport', 'inParent="sp_DBR_parent_name"';
    
    select ....

    --
    myDBR Team

  3. situ, Member

    Hi,

    Following the above guidance is it possible to pass an integer as a constant parameter?

    eg. 'inParent=0'

    In the case of zero I think it works but if i want to pass a constant of 1 then this will get it confused with column 1, placing quotes around the integer seems to be interpreted as a varchar.

  4. myDBR Team, Key Master

    You can use 'inParent="0"'

    The constant parameters are encloded in quotation marks regardless of the datatype. myDBR will determine the datatype from the linked report's parameter, so if inParent is an integer, it will be treated like an integer.

    --
    myDBR Team


Reply

You must log in to post.