linked report param - passing variable

(5 posts) (2 voices)

Tags:

No tags yet.

  1. eugfri, Member

    hi,

    I have just updated my mydbr installation to 6.6.0 (build 4818) and I have started seeing error messages which look as follows:


    Invalid column reference for linked report sp_DBR_PartIdentifiers_update parameter inPartID

    Did not have these before with the following bit of code:

    SELECT PartID INTO vPartID FROM TempPartDetails WHERE partnumber=inPartNumber LIMIT 1;

    SELECT 'dbr.keepwithnext'; SELECT 'dbr.button', 'EDIT PART IDS'; SELECT 'dbr.report', 'sp_DBR_PartIdentifiers_update', 'popup', 'inLogin=(inLogin)', 'inPartNumber=(inPartNumber)', 'inPartID=(vPartID)', 'inMode="EDIT"';

    i.e. i was passing variable populated inside of proc as param value to the linked report in regular parenthesis and everything was working fine.
    Now after mydbr version update i see errors like ths.

    Plz advise.

    Thank you!

    Eugene

  2. myDBR Team, Key Master

    Eugene,
    the (in_parameter) syntax refers to a report parameter. Your inPartID=(vPartID) tries to use local variable as a parameter.

    You can pass the variable into a linked report via the result set:

    SELECT PartID INTO vPartID FROM TempPartDetails WHERE partnumber=inPartNumber LIMIT 1;
    
    SELECT 'dbr.keepwithnext';
    SELECT 'dbr.button', 'EDIT PART IDS';
    SELECT 'dbr.report', 'sp_DBR_PartIdentifiers_update', 'popup', 'inLogin=(inLogin)', 'inPartNumber=(inPartNumber)', 'inPartID=PartID', 'inMode="EDIT"'; select vPartID as 'PartID';

    --
    myDBR Team

  3. eugfri, Member

    I understand I can do that, but my code worked fine before the way exactly as I pasted in my question. I was able to pass local variable to linked reports as parameter via () syntax. And this broke after patching.

    I do have multiple places in my application where I relied on this, I.e. passing local var to linked report in ().

    If now to make things work again I have to have select vPartID as ‘PartID’;
    I need to be able to suppress results of this select from being displayed.

    How can I do this?

  4. myDBR Team, Key Master

    Eugene,
    It could be that you had a parameter named like that or that the report was somehow changed, as that could not have worked.

    myDBR knows the parameter names for the report and the output of the report. It does not see "inside" the report, meaning it does not know that you have a local variable named vPartID in your code. Therefore you need to pass the content of the variable in the result set after to the dbr.report'. That result set will not be displayed as myDBR will handle that as input for the dbr.report'.

    Can you show the full report code (if not in the forum, then as a support ticket)? That may explain the behavior.

    --
    myDBR Team

  5. eugfri, Member

    The whole report is too big and after all i have just added select as you suggested and things started working again. I may have other places in my application with the same issue, but i will find them eventually and make same code change.
    So its ok for now.
    Thank you for quick responses!


Reply

You must log in to post.