Page Index Toggle Pages: 1 [2]  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) [Solved] User is printing faster than Sesame (Read 2612 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: [Solved] User is printing faster than Sesame
Reply #15 - Oct 10th, 2007 at 5:20pm
Print Post Print Post  
Quote:
Since you moved the declarations for vLoop and vCount into the Subroutine, you will probably want to remove the originals so that you don't confuse yourself. 

Yup, did that, direct transplant.
Quote:
Also you may want to include a message that tells your users that they can not print more than 20 invoices at a time incase they try to print 21. This way you save yourself the "IT'S NOT WORKING" message from your users. 

Probably.  But with this situation, unlike a real problem, I know in advance why it's not working.  So, forearmed and smug with self-confidence, I can easily maintain my status as a miracle worker.  HELLO, COMPUTER!!  WHIP ME UP SOME TRANSPARENT ALUMINUM!!  THERE BE WHALES HERE!!!

(Yes, I have Star Trek on my mind today.  About an hour ago I bought a ticket to the November 19 theatrical showing of the remastered "The Menagerie".  I've never seen Trek on the big screen, it should be a hoot.)

P.S. There's only 1 user who would ever be printing a "batch" of Invoices, and I've already told her about the limits, so there will be no surprises.
  

**
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: [Solved] User is printing faster than Sesame
Reply #16 - Oct 10th, 2007 at 6:33pm
Print Post Print Post  
Infinity wrote on Oct 10th, 2007 at 5:20pm:
Quote:
Since you moved the declarations for vLoop and vCount into the Subroutine, you will probably want to remove the originals so that you don't confuse yourself. 

Yup, did that, direct transplant.


They still exist in the code that you had posted up above, which is why I was not sure.

-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: [Solved] User is printing faster than Sesame
Reply #17 - Oct 10th, 2007 at 7:04pm
Print Post Print Post  
Yeah, sorry, I Frankensteined that together for my post.
  

**
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: User is printing faster than Sesame
Reply #18 - Oct 12th, 2007 at 6:05pm
Print Post Print Post  
Infinity wrote on Oct 9th, 2007 at 2:46pm:
Maybe I should ship my printer to you.    Undecided


Well Scott after a very tiring search we just found your printing problem and It has nothing to do with the printer.

In Global Code you have a subroutine named ChecKItemLength. In that subroutine is the problem. You are calling PrintString without calling NewPage() and CancelPage(). PrintString as documented on Page 309 of the Sesame 2.0 Programming Guide will call NewPage(), if a Print Page does not already exist and set the width as 750 and the height as 1000.

Now you may be wondering what that has to do with your printing of invoices. It's simple. If a Print Page already exists a new one is not created when NewPage() is called. So your invoices are being printed using a grid of 750 by 1000 after that subroutine is run and a grid of 850, 1100 before that subroutine is run. Which results in I believe a 12% shift on the X and a 9% shift on the Y, which results in the skewed results that you were getting. And it would only happen after leaving certain elements which results in your "Random" problem.

So what you are going to want to do is in the ChecKItemLength subroutine add a NewPage(850, 1100) call before the PrintString call and a CancelPage() call at the end of the subroutine. Also check for other places where you may be doing the same thing, as I've seen a few.

-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: [Solved] User is printing faster than Sesame
Reply #19 - Oct 13th, 2007 at 3:45pm
Print Post Print Post  
Ray, if you were here, or I were there, I would kiss you.  Seriously.  I would grab you in a bear hug and plant one right on you, and Ben too.  I can't begin to thank you enough for all the work you did to solve this problem.  I have never, ever in my life, encountered such willing and able customer support for any software or hardware device I have ever used.  You folks are amazing.

I apologize for the sloppy coding and lack of research to do it correctly to begin with.  I'm not sure where I got the base code for the routine to check item length but I really should have read more about the process before instituting it.  I'm sorry to have been such a pain but I am overwhelmingly grateful that you put up with me and my problem through all this.  THANK YOU!!
  

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


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: [Solved] User is printing faster than Sesame
Reply #20 - Oct 13th, 2007 at 5:14pm
Print Post Print Post  
Now THERE's a testmonial for the next release! Grin
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ben
Lantica Support
*****
Offline



Posts: 218
Joined: Apr 7th, 2005
Re: [Solved] User is printing faster than Sesame
Reply #21 - Oct 15th, 2007 at 1:24pm
Print Post Print Post  
Infinity wrote on Oct 13th, 2007 at 3:45pm:
THANK YOU!!

You're welcome.
  
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: [Solved] User is printing faster than Sesame
Reply #22 - Oct 15th, 2007 at 8:20pm
Print Post Print Post  
Infinity wrote on Oct 13th, 2007 at 3:45pm:
Ray, if you were here, or I were there, I would kiss you.....


I'll pass on the kiss Scott, but I will take the Thank You and say that you are Welcome.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send Topic Send Topic Print Print