You need to do this.  When the variables are part of an RBase command, you 
need to preface with & rather than .


PRINT &vReportName &vWhereClause  &vOrderBy OPTION SCREEN

 
Karen


 

-----Original Message-----
From: Matthew Brock <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Mon, Mar 17, 2014 12:39 pm
Subject: [RBASE-L] - concat variables



I am trying to print using variables and can not get it to work.
I am sending in variables


SET VAR vReportWhere = 'Item_Number = 100'
SET VAR vReportName = 'IM_ALL_1'
SET VAR vReportOrderBy = 'Item_Number'


Then i set new variables based on the above
SET VAR vWhereClause = ' WHERE ' + .vReportWhere + ' '
SET VAR vOrderBy = ' ORDER BY ' + .vReportOrderBy' + ' ASC '


Then i try and call a PRINT command


PRINT .vReportName .vWhereClause .vOrderBy OPTION SCREEN


I have tried putting + which is not suppose to add a space
I have tried putting & which is suppose to add a space


Still nothing works unless i try
PRINT IM_ALL_1 WHERE Item_Number = 100 ORDER BY Item_Number ASC OPTION SCREEN


Where is my syntax wrong?



 
Thanks,
Matthew D. Brock




Reply via email to