Author | Topic: Re: Multi-Page Text File Problem - Topdown | |
---|---|---|
Andreas Gehrs-Pahl View the complete thread for this message in: | Re: Multi-Page Text File Problem - Topdown on Mon, 14 Mar 2016 12:40:28 -0400 Scott, >The error occurs when I send a multiple page document to a text file. I use >the topdown print previewer for this purpose. The bombout occurs when the >NEWPAGE method is called. It errors out on the qqout(chr(12)) line below. It >seems like I don't have the same character set available in my two systems >possibly...but I can't see what needs to change. Does anyone have any >thoughts? The reason for the runtime error is actually that SetAppWindow() doesn't return a valid XbpCRT() dialog when the QQOut() function is executed. >The error I get is "Access to method not allowed in this context". A complete error log would be more helpful than just a generic error message. I assume that the actual Sub-System Error Code is: 4402 (with error message: "Method is not allowed for an Object of this Class") and that the Set Console setting is On, but those are just educated guesses. To fix this, make either sure that your SetAppWindow() is set to return a (valid) XbpCRT() dialog, before calling any console output functions, such as QOut() and QQOut(), or use Set Console Off to disable screen output for such functions. As you are also using SetPrc(0,0) in your code, I also assume that you use @ Say (or more precisely DevOut()) to print text to the printer, redirecting the output with Set Device to Printer. Basically, Set Device affects the DevPos()/DevOut() etc., while Set Console affects QOut()/QQOut(). Alternatively, you could remove the QQOut(chr(12)) line completely, and replace it with the EJECT command (or directly with the _Eject() function). I recommend to RTFM, specifically the following topics: EJECT, Set Printer, Set Device, and Set Console, for more details on which areas those settings affect. Hope that helps, Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas@AbsoluteSoftwareLLC.com web: http://www.AbsoluteSoftwareLLC.com |