Page Index Toggle Pages: 1 [2]  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Printout problem (Read 4212 times)
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Printout problem
Reply #15 - Nov 2nd, 2007 at 11:20am
Print Post Print Post  
Infinity wrote on Nov 2nd, 2007 at 10:27am:
While you're digging in there, is it possible to redesign PrintString() so that it can handle @ symbols without jumping through hoops (to coin a phrase)?  Seems like just about everybody will need to print the symbol at some point, what with email addresses being so ubiquitous.


I'm not sure, but that's actually why I suggested you make the cleaner a function. So that, if we do manage that, you can comment out the one @Replace rather than having to chase it through all your PrintString statements.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Printout problem
Reply #16 - Nov 2nd, 2007 at 11:34am
Print Post Print Post  
Thanks.  I am using the Function and it is working well, replacing "@" with "at".  Which is fine for my Invoice printouts where they break out rates ("1 hour at $57.00", for example), but will not work for email addresses (which I'm not currently having to print, but I'm sure I will someday).
  

**
Captain Infinity
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Printout problem
Reply #17 - Nov 2nd, 2007 at 11:59am
Print Post Print Post  
Quote:
Hello Scott,
I see what you are seeing here. I think it has to do with a problem in an underlying library and the @ symbol. I'll pass it on to development.


It's funny, but before I started using the function, I was hard coding @replace() statements into my Invoice printout, using a variable.  I.E.:
Code
Select All
Var vNewString as String

// Prints the job description
vNewString = @Replace(Desc_line_1, "@", "@@")
PrintString(vNewString, 20, (vPosY1 + 15), 0, vFont, vSize, 0)
vNewString = @Replace(Desc_line_2, "@", "@@")
PrintString(vNewString, 20, (vPosY1 + 35), 0, vFont, vSize, 0)
vNewString = @Replace(Desc_line_3, "@", "@@")
PrintString(vNewString, 20, (vPosY1 + 55), 0, vFont, vSize, 0)
vNewString = @Replace(Desc_line_4, "@", "@@")
PrintString(vNewString, 20, (vPosY1 + 75), 0, vFont, vSize, 0)
vNewString = @Replace(Desc_line_5, "@", "@@")
PrintString(vNewString, 20, (vPosY1 + 95), 0, vFont, vSize, 0)
vNewString = @Replace(Desc_line_6, "@", "@@")
PrintString(vNewString, 20, (vPosY1 + 115), 0, vFont, vSize, 0)
vNewString = @Replace(Desc_line_7, "@", "@@")
PrintString(vNewString, 20, (vPosY1 + 135), 0, vFont, vSize, 0)
vNewString = @Replace(Desc_line_8, "@", "@@")
PrintString(vNewString, 20, (vPosY1 + 155), 0, vFont, vSize, 0)
vNewString = @Replace(Desc_line_9, "@", "@@")
PrintString(vNewString, 20, (vPosY1 + 175), 0, vFont, vSize, 0) 


And this was working (and is still working) for every line on my Invoice except the top portion, where I print the Company Name, Address, Contact, P.O. Number, etc.  When I tried it in in my Workorders, it worked for all the details of the Delivery customer, but none of the Pickup customer, which is strange because it's exactly the same data coming from different but identical elements.  The problem seems to be randomly, eccentrically selective.

As it stands now, I'm using the function to replace "@" with "at" everywhere on my Workorder, and on the top section of my Invoice.  The bottom section of my Invoice has the hard coding you see above (replacing "@" with "@@") and is happily printing the @ symbol on every line that shows a "description @ rate" string.  It's perverse, but it's working.

Let me know if you'd like to see the code, maybe it will help with your investigation.

  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Printout problem
Reply #18 - Nov 2nd, 2007 at 12:06pm
Print Post Print Post  
Scott,

Whether the problem manifests seems to be related to the width of the value against the width of the "box" it prints inside. Some values with @ will print fine just by doubling the @. Others will not. We have not yet tracked down the exact circumstances that cause failure.

This can be seen in other places than PrintString. For example, a static text element containing @@ will show this behavior if resized just so.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Printout problem
Reply #19 - Nov 2nd, 2007 at 12:12pm
Print Post Print Post  
Ah, I see, that makes sense.  In general, it's working for every string I do not limit width, and failing for the ones I do.  Good to know, thanks.
  

**
Captain Infinity
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Printout problem
Reply #20 - Nov 2nd, 2007 at 12:34pm
Print Post Print Post  
A related question....  I just tried an experiment with a record that has a long value on a line whose width I do not regulate (80 characters) to see if its length would cause an embedded "@" symbol to make it truncate.  The whole thing printed but, curiously, the line wrapped at just shy of 7 inches from the left margin, and I can't figure out why.  Visually, I have another inch or more for the line to print on before wrapping.  The code for the printstring is:
Code
Select All
vNewString = @Replace(Desc_line_1, "@", "@@")
PrintString(vNewString, 20, (vPosY1 + 15), 0, vFont, vSize, 0) 


vNewString is a String variable.  The other variables are:
vPosY1 = 330 (330 from the top of the form)
vFont = "Sans Serif"
vSize = 16
and my page is set up as
Code
Select All
NewPage(850,1100)
PrintPageMargin(0, 0, 18, 0) 


What am I overlooking?
  

**
Captain Infinity
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Printout problem
Reply #21 - Nov 6th, 2007 at 6:20pm
Print Post Print Post  
Scott,

You're not overlooking anything. It's related to the the same problem as the text not appearing if it has a @ in it.

-Ray
  

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


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Printout problem
Reply #22 - Sep 7th, 2011 at 1:50pm
Print Post Print Post  
I apologize for resurrecting such an old topic, but this issue popped up for me again, when one of my dispatchers placed an @ symbol in a line of text that usually would not contain such a symbol.  My current programming for printing this section is:
Code
Select All
// Prints the job description
vNewString = @Replace(Desc_line_1, "@", "@@")
PrintString(vNewString, 20, (vPosY1 + 15), 0, vFont, vSize, 0)
vNewString = @Replace(Desc_line_2, "@", "@@")
PrintString(vNewString, 20, (vPosY1 + 35), 0, vFont, vSize, 0)
vNewString = @Replace(Desc_line_3, "@", "@@")
PrintString(vNewString, 20, (vPosY1 + 55), 0, vFont, vSize, 0)
.... 



This has been working well so far because most of the lines in the "Description" section are short, and generally everything fits.  But one line of her's was long, and the @ symbol made it wrap the last inch and a half onto the next line (even though there's space available on the line it's supposed to be on) which overwrote text on that next line.

Anyway, long story, but my question is, has Development been able to tackle this issue in the latest releases?  I'm using Sesame Version 2.0.6 right now.
  

**
Captain Infinity
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Printout problem
Reply #23 - Sep 7th, 2011 at 5:58pm
Print Post Print Post  
Hello Scott,

Looking in the change log I see an entry for 2.5.2 that says

Quote:
Fix to allow @@ to be printed using PrintString without affecting wrapping.


So I believe this one should be fixed.

-Ray
  

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


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Printout problem
Reply #24 - Sep 10th, 2011 at 11:27am
Print Post Print Post  
Thanks Ray!!
  

**
Captain Infinity
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send Topic Send Topic Print Print