Code I use in Stored Procedure:

{begin code}
*(sp_Addr mod 011505 mbyerley)
*(Use only 2 Ret VarNames vRetText and vRetInt)
*(Input Params should be of: pt1,pt2, for text pi1,pi2 for Int)
CLEAR VAR MICRORIM_RETURN, stp_return
SET VAR pt1 TEXT
SET VAR vcr = ((CHAR(13)) + (CHAR(10)))
SELECT mainname, address1, address2, city, statename, zipcode, zipplus +
INTO vspmainname IND vspin0, vrettextess1 IND vspin0, vrettextess2 IND
vspin0, +
vspcity IND vspin0, vspstatename IND vspin0,vspzipcode IND vspin0, +
vspzipplus IND vspin0 +
FROM vwcontacts WHERE (cid = .pt1)

IF SQLCODE = 0 THEN
  SET VAR vrettext = .vspmainname
  IF vrettextess1 <> NULL OR (SLEN((STRIM(.vrettextess1)))) > 0 THEN
    SET VAR vrettext = (.vrettext + .vcr + .vrettextess1)
  ENDIF
  IF vrettextess2 <> NULL OR (SLEN((STRIM(.vrettextess2)))) > 0 THEN
    SET VAR vrettext = (.vrettext + .vcr + .vrettextess2)
  ENDIF
  IF vspcity <> NULL OR (SLEN((STRIM(.vspcity)))) > 0 THEN
    SET VAR vrettext = (.vrettext + .vcr + .vspcity)
  ENDIF
  IF vspstatename <> NULL OR (SLEN((STRIM(.vspstatename)))) > 0 THEN
    SET VAR vrettext = (.vrettext + ' ' + .vspstatename)
  ENDIF
  IF vspzipcode <> NULL OR (SLEN((STRIM(.vspzipcode)))) > 0 THEN
    SET VAR vrettext = (.vrettext + ' ' + .vspzipcode)
  ENDIF
  IF vspzipplus <> NULL OR (SLEN((STRIM(.vspzipplus)))) > 0 THEN
    SET VAR vrettext = (.vrettext + '-' + .vspzipplus)
  ENDIF
ELSE
  SET VAR vrettext = 'No Address Entry'
ENDIF

Clear Var pt1
CLEAR VAR vspin0,vspcity,vspstatename,vrettextess1,vrettextess2, +
vspmainname,vspzipcode,vspzipplus
RETURN .vrettext

{end code}
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Tony IJntema
Sent: Sunday, March 15, 2015 4:07 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Position of Adress information in a report

I need to create a report (actually it is a letter) in which the position of
the address information should be flexible.
It could be at the left or right and so on. Also its position from the top
needs to be flexible.
This report will be used in a compiled situation

Has anyone solved this problem before?


Tony


Reply via email to