Can we use macro variables in a SQL report?




  • Official comment
    Yaremi Miranda Lopez

    Hello Mark,

    In this last release, we include the possibility to use variables in almost all the UF. You can see more detail in this link:

    Comment actions Permalink
  • Avatar
    Dave Gutman

    Hi Mark,

    I tried this a few ways and no-go here also. 

    Would this work?  Create a Macro UF that runs before your SQL Report, and finishes by calling the report.  So the macro UF is called that from your screen, and in it use the SET command to put the value of the @STOREx variable into a blank field on the screen.  After it does that the Macro would call the SQL Report UF and use dynamic syntax to get the value of the @STOREx variable that you dropped in the field.  Yeah, that's pretty convoluted but might work if you have a spare field that wouldn't have a risk of being updated.

    Comment actions Permalink
  • Avatar
    Brian Su



    anybody from boyum got an answer to this issue?


    I have something similar.  Created a UF SQL report and try to transfer over the stored value to the SQL Variable in that report but it does not recognise the SQL report variable screen so cannot transfer the set stored value over or click to run it:



    Activate(5909); UF(UF-093);





    I have also tried to directly write a SQL (its HANA version I am on currently) in the SQL Variable of the report such as the below but can only past over the literal text of @STORE66 not the value:


    %0[SQL:SELECT '@STORE66' test, '@STORE66' test2 FROM DUMMY|Serial Number];


    Would be greatly appreciated if someone in Boyum can advise.





    Comment actions Permalink
  • Avatar
    Yaremi Miranda Lopez

    Hello Brian,

    Please make sure you have the latest version since this feature was recently released. If you are in the latest version and the problem persists, please contact your local Partner.

    Comment actions Permalink

Please sign in to leave a comment.