Normal Topic Printing Email address using PrintString (Read 15756 times)
cbislander
Full Member
***
Offline



Posts: 103
Joined: Mar 22nd, 2018
Printing Email address using PrintString
May 31st, 2020 at 11:38pm
Print Post Print Post  
In our Invoice program, there is a field to enter a customer's email address.  This is stored in the database, but does not print on the paper copy of the invoices.  Our secretary wants it on the paper copy of the invoices for her warranty work.

     vEmail = @STR(EMAIL)
     PrintString("EMAIL:"+ vEMAIL, 65, 300, 0, "BArial", 14, 0)
     PrintString("DEL INFO:"+ COMMENT, 380, 300, 0, "BArial", 14, 0)


I thought this would be simple just printing the field, but it only printed the information before the "@" sign. 

Email information on form  = yourname@gmail.com

Printed Result :  yourname

The field is a TEXT field and I try to use Var vEmail as String, but it did the same thing.  Is there something else I have to do?


I try a few work arounds.

I made one string for the left (vL) of the "@" sign and another for the right (vR).

I then tried.

     PrintString("EMAIL:"+ vL + "@" + vR, 65, 300, 0, "BArial", 14, 0)

and

     PrintString("EMAIL:"+ vL + @CHR(65) + vR, 65, 300, 0, "BArial", 14, 0).

Both had the same result, the "@" and anything after it did not print.

The only way it could work is using the command below.

     PrintString("EMAIL:"+ vL + "(a)" + vR, 65, 300, 0, "BArial", 14, 0)




« Last Edit: Jun 1st, 2020 at 11:47am by cbislander »  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Printing Email address using PrintString
Reply #1 - Jun 1st, 2020 at 1:27pm
Print Post Print Post  
Hello,

The @ symbol is used by PrintString() to create arrows and other symbols. The following should work for you

Code
Select All
vEmail = @STR(EMAIL)
     vEmail = @Replace(vEmail, "@", "@@")
     PrintString("EMAIL:"+ vEMAIL, 65, 300, 0, "BArial", 14, 0)
     PrintString("DEL INFO:"+ COMMENT, 380, 300, 0, "BArial", 14, 0) 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
cbislander
Full Member
***
Offline



Posts: 103
Joined: Mar 22nd, 2018
Re: Printing Email address using PrintString
Reply #2 - Jun 2nd, 2020 at 1:48pm
Print Post Print Post  
That worked fine, thanks.
  
Back to top
 
IP Logged