Normal Topic [Solved] Printing Issue (Read 465 times)
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
[Solved] Printing Issue
Feb 25th, 2008 at 3:51am
Print Post Print Post  
Good Evening:

I currently print our GL account # on the bottom portion of our cheque stub for reference purposes.

Previously it was a 4 digit number but I have since upgraded it to a 10 digit number.

However, it is now printing a different 10 digit number than entered in the field for some reason.

When I change it back to the 4 digit number, it prints OK. 


Code as follows which has not change:

PrintString(vGL Account,250, 950, 0, vFont, vSize, 0)

For example, the old GL 6070 would print as 6070 on the bottom of the form.

The new GL 6070500740 prints a different number - 1775533444

Does not make sense and any feedback would be appreciated.

Thanks,

Louis Galvao

« Last Edit: Feb 25th, 2008 at 7:00pm by Hammer »  

Louis Galvao
Back to top
 
IP Logged
 
MP
Full Member
***
Offline



Posts: 104
Joined: Sep 3rd, 2007
Re: Printing Issue
Reply #1 - Feb 25th, 2008 at 11:20am
Print Post Print Post  
Quote:
The new GL 6070500740 prints a different number - 1775533444

I suspect this is an integer overflow issue.  Potentially, Sesame is converting your Number field to an Integer before processing it via PrintString.  The maximum value of a signed 4-byte Integer is 2,147,483,647.  Your sample value exceeds that.  Try doing an explicit conversion to a string (using @STR) and see what happens.

Example: PrintString( @STR( vGL Account ),250, 950, 0, vFont, vSize, 0)
  
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: Printing Issue
Reply #2 - Feb 25th, 2008 at 1:57pm
Print Post Print Post  
Hello Louis,

Sesame by itself will not convert anything to an Integer but it may be that vGL Account is defined as an Integer in your code. Try changing the variable declaration to a string.

-Ray
  

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


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: Printing Issue
Reply #3 - Feb 25th, 2008 at 6:49pm
Print Post Print Post  
Well, the vGL Account is defined as INT in a Function PrintCheck and I changed it to string and it now works.

Thanks for the feedback from both of you.

Louis Galvao
  

Louis Galvao
Back to top
 
IP Logged