Employee Card

Base alias is "Employee".


Download full example.

This example is for XFRX 19.1.0 because use position with bottom.


Data preparation

m.lcTASTRADE=HOME(2)+"Tastrade\Data\"
OPEN DATA (m.lcTASTRADE+"TASTRADE")

USE employee ORDER  "EMPLOYEE_I" IN 0

SELECT ("employee")
SET FILTER TO RECNO()<=1
TEXT TO m.pcEmployee TEXTMERGE NOSHOW
<p style="border-width:1px;border-style:solid;border-color:'Black';height:100vh;curvature:25;padding:0vh 0vh 5vh 0vh;position:relative;">
<img style="float:right;width:50vw;height:33vh;position:absolute;stretch:stretch;margin:2vh 2vh 0vh 2vh;bottom:0px">"<<m.lcTASTRADE>>..\"+PHOTO_FILE</img>
<p style="background-color:RGB(121,121,255);text-align:center;width:100%;font-weight:bold;
          line-height:2.4rem;font-name:Tahoma;color:RGB(255,255,255);margin-top:5vh;font-size:2rem;">Employee Card</p>

<p style="margin:2vh;tab-size:0.5rem;width:100%;">
<span style="color:RGB(121,121,255)">ID:</span><br> <tab/><vfpev>PADL(ALLTRIM(EMPLOYEE_ID),6,"0")</vfpev><br>
<span style="color:RGB(121,121,255)">Name:</span><br> <tab/><vfpev>ALLTRIM(FIRST_NAME)</vfpev> <vfpev>ALLTRIM(LAST_NAME)</vfpev><br>
<span style="color:RGB(121,121,255)">Title:</span><br> <tab/><vfpev>ALLTRIM(TITLE)</vfpev><br>
<span style="color:RGB(121,121,255)">Telephone:</span><br> <tab/><vfpev>ALLTRIM(HOME_PHONE)</vfpev><br>
<span style="color:RGB(121,121,255)">Notes:</span><br> <tab/><vfpev style="font-size:0.6rem;">ALLTRIM(NOTES)</vfpev>
</p>

</p>
ENDTEXT

Run XFRX

m.loSession=EVALUATE([xfrx("XFRX#INIT")])
*m.loSession.setLogFile(m.lcPath+"XFRX.log")

m.lnRetVal = loSession.SetParams(,,,,.T.,,"XFF")
IF m.lnRetVal=0
   m.loSession.ProcessReport(m.lcPath+"employee_card")
   m.loXFF=m.loSession.finalize()
   
   SET CLASSLIB TO xfrxlib\xfrxlib ADDITIVE 

   m.loPreview = CREATEOBJECT("frmMPPreviewer")
   m.loPreview.iEmail = 1 && show the email icon
   m.loPreview.lVFP8 =.T. && use XFRX#INIT
   *m.loPreview.setLogFile(m.lcPath+"XFRXPreview.log")
   
   m.loPreview.windowtype = 1
   m.loPreview.windowState = 0
   
   m.loPreview.PreviewXFF(m.loXFF)
   m.loPreview.show()
   
ENDIF   

Result


Â