dbTalk Databases Forums  

Mixing VFP and System Printing Functionality

comp.databases.xbase.fox comp.databases.xbase.fox


Discuss Mixing VFP and System Printing Functionality in the comp.databases.xbase.fox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gene Wirchenko
 
Posts: n/a

Default Mixing VFP and System Printing Functionality - 11-24-2006 , 11:30 AM






VFP has a wonky way to set printer orientation: sys(1037). This
is intended for end-user use. I have to use keyboard to use it
programmatically. The flash on the screen is a kludge and a bit
bothersome. My boss recently commented on the latter. Since I am
using set printer on and ? -style reporting, this is what I have to
use. How can I get rid of it?

If there is a way to have it "show up" off-screen, that would be
a purely-VFP solution. That would be acceptable, though granted, it
is still somewhat of a kludge. Is there such a way?

Another way *might* be to jump into the Windows API. I really do
not want to recode all my reports, so I would want to be able to just
insert the OS calls at the appropriate point. HOW?

The big question is how do I refer to a VFP printjob? Can I
combine the two usages? Presumably, if I can set orientation this
way, I could do other things as well, but just getting printer
orientation working would meet the current and likely needs.

Has anyone worked with the printing part of the Windows API?
Pointers are also and especially welcome.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.

Reply With Quote
  #2  
Old   
Bernhard Sander
 
Posts: n/a

Default Re: Mixing VFP and System Printing Functionality - 11-24-2006 , 11:55 AM






Hi Gene,
Quote:
VFP has a wonky way to set printer orientation: sys(1037). This
is intended for end-user use. I have to use keyboard to use it
programmatically. The flash on the screen is a kludge and a bit
bothersome. My boss recently commented on the latter. Since I am
using set printer on and ? -style reporting, this is what I have to
use. How can I get rid of it?
Did you try my idea from oct.13 in your thread "VFP9: Alternative to sys(1037)"
about using the additional parameters of sys(1037)

Regards
Bernhard Sander


Reply With Quote
  #3  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: Mixing VFP and System Printing Functionality - 11-24-2006 , 01:51 PM



Bernhard Sander <fuchs (AT) no (DOT) spam> wrote:

Quote:
Hi Gene,
VFP has a wonky way to set printer orientation: sys(1037). This
is intended for end-user use. I have to use keyboard to use it
programmatically. The flash on the screen is a kludge and a bit
bothersome. My boss recently commented on the latter. Since I am
using set printer on and ? -style reporting, this is what I have to
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
use. How can I get rid of it?

Did you try my idea from oct.13 in your thread "VFP9: Alternative to sys(1037)"
about using the additional parameters of sys(1037)
No, because it does not apply. From the VFP 9 docs on sys(1037):
"All three report-related SYS(1037,<N>) variants require access to a
cursor or open table with the same format as a report (.frx) or label
(.lbx) definition file. The report must be selected as a cursor or
opened as a table before you call the function, and Visual FoxPro
requires the report table to be opened exclusively. Otherwise, an
error occurs when you call the function. For more information about
the structure of report and label tables, see Table Structures of
Table Files (.dbc, .frx, .lbx, .mnx, .pjx, .scx, .vcx)."

Please note that I am not using the Report Writer. That is the
significance of the above caret-captioned text.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.


Reply With Quote
  #4  
Old   
tony_becky_mikey_verizon_news
 
Posts: n/a

Default Re: Mixing VFP and System Printing Functionality - 11-24-2006 , 08:06 PM



Gene,
Why would you NOT use the Foxpro report writer?? I am confused here...

Tony Miller
Monroe, WA

"Gene Wirchenko" <genew (AT) ocis (DOT) net> wrote

Quote:
Bernhard Sander <fuchs (AT) no (DOT) spam> wrote:

Hi Gene,
VFP has a wonky way to set printer orientation: sys(1037). This
is intended for end-user use. I have to use keyboard to use it
programmatically. The flash on the screen is a kludge and a bit
bothersome. My boss recently commented on the latter. Since I am
using set printer on and ? -style reporting, this is what I have to
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
use. How can I get rid of it?

Did you try my idea from oct.13 in your thread "VFP9: Alternative to
sys(1037)"
about using the additional parameters of sys(1037)

No, because it does not apply. From the VFP 9 docs on sys(1037):
"All three report-related SYS(1037,<N>) variants require access to a
cursor or open table with the same format as a report (.frx) or label
(.lbx) definition file. The report must be selected as a cursor or
opened as a table before you call the function, and Visual FoxPro
requires the report table to be opened exclusively. Otherwise, an
error occurs when you call the function. For more information about
the structure of report and label tables, see Table Structures of
Table Files (.dbc, .frx, .lbx, .mnx, .pjx, .scx, .vcx)."

Please note that I am not using the Report Writer. That is the
significance of the above caret-captioned text.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.



Reply With Quote
  #5  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: Mixing VFP and System Printing Functionality - 11-25-2006 , 12:43 AM



"tony_becky_mikey_verizon_news" <tony_becky_mikey (AT) verizon (DOT) net> wrote:

Quote:
Why would you NOT use the Foxpro report writer?? I am confused here...
Control. Some of my reports are rather complex, and my boss can
give arbitrarily complex changes. I find straight code much easier to
read for this, and I have tools for searching my code, which aids
considerably in maintaining it.

[snip]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.


Reply With Quote
  #6  
Old   
tony_becky_mikey_verizon_news
 
Posts: n/a

Default Re: Mixing VFP and System Printing Functionality - 11-25-2006 , 02:40 PM



So you are saying you don't have control of the layout in a report form?
This sounds kind fishy here.. Is it a matter of you don't like using the
more MODERN tools available? Please tell me you are atleast using forms in
VFP...

If I had to maintain someone's code that was not using report forms, I would
not be maintaining that version of code for long... When you move up to the
more involved development environments, see Oracle and SQL Server, you will
find it hard NOT to use a report writer (Crystal Reports, Oracle Report
Writer, Cognos...).

But then again, some folks will always be using Foxpro...

Thanks ,

Tony Miller
Monroe, WA

"Gene Wirchenko" <genew (AT) ocis (DOT) net> wrote

Quote:
"tony_becky_mikey_verizon_news" <tony_becky_mikey (AT) verizon (DOT) net> wrote:

Why would you NOT use the Foxpro report writer?? I am confused here...

Control. Some of my reports are rather complex, and my boss can
give arbitrarily complex changes. I find straight code much easier to
read for this, and I have tools for searching my code, which aids
considerably in maintaining it.

[snip]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.



Reply With Quote
  #7  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: Mixing VFP and System Printing Functionality - 11-26-2006 , 01:40 AM



"tony_becky_mikey_verizon_news" <tony_becky_mikey (AT) verizon (DOT) net> wrote:

Quote:
So you are saying you don't have control of the layout in a report form?
This sounds kind fishy here.. Is it a matter of you don't like using the
more MODERN tools available? Please tell me you are atleast using forms in
VFP...
I find that having my programming all in code makes it easier to
deal with. Yes, I use forms. I do not use the Form Designer though.

Quote:
If I had to maintain someone's code that was not using report forms, I would
not be maintaining that version of code for long... When you move up to the
more involved development environments, see Oracle and SQL Server, you will
find it hard NOT to use a report writer (Crystal Reports, Oracle Report
Writer, Cognos...).
I find maintaining such to be quite awkward. The code is all
over, and more than code is controlling the effects. I like to be
able to look/pore over a listing that has all of the programming.

Writing it initially appears to be easier. Maintaining it is
difficult.

I refer to programming that hangs together as a unit (rather than
being scottered) as being contiguous. I like high-contiguity
programming.

Quote:
But then again, some folks will always be using Foxpro...
Possibly. I find VFP to be a good tool. It is not perfect, but
what is? That it is not new is not a negative for me.

[snipped previous]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.


Reply With Quote
  #8  
Old   
swdev2
 
Posts: n/a

Default Re: Mixing VFP and System Printing Functionality - 11-26-2006 , 05:59 PM



Gene -
A Screen Flash might be indicative of the talk setting -
whats the value of 'set talk' right prior to calling the sys(1037) function
?
Regards [Bill]
--
===================
William Sanders / EFG VFP / mySql / MS-SQL
www.efgroup.net/vfpwebhosting
www.terrafox.net www.viasqlserver.net

"Gene Wirchenko" <genew (AT) ocis (DOT) net> wrote

Quote:
VFP has a wonky way to set printer orientation: sys(1037). This
is intended for end-user use. I have to use keyboard to use it
programmatically. The flash on the screen is a kludge and a bit
bothersome. My boss recently commented on the latter. Since I am
using set printer on and ? -style reporting, this is what I have to
use. How can I get rid of it?

If there is a way to have it "show up" off-screen, that would be
a purely-VFP solution. That would be acceptable, though granted, it
is still somewhat of a kludge. Is there such a way?

Another way *might* be to jump into the Windows API. I really do
not want to recode all my reports, so I would want to be able to just
insert the OS calls at the appropriate point. HOW?

The big question is how do I refer to a VFP printjob? Can I
combine the two usages? Presumably, if I can set orientation this
way, I could do other things as well, but just getting printer
orientation working would meet the current and likely needs.

Has anyone worked with the printing part of the Windows API?
Pointers are also and especially welcome.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.



Reply With Quote
  #9  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: Mixing VFP and System Printing Functionality - 11-26-2006 , 10:57 PM



"swdev2" <wsanders (AT) dotnetconversions (DOT) bob.com> wrote:

Quote:
A Screen Flash might be indicative of the talk setting -
whats the value of 'set talk' right prior to calling the sys(1037) function
?
No, the flash is of the sys(1037) form showing up. "flash" is a
slight exagggeration. It shows up long enough that I can see what it
is, long enough to irritate my boss and me, but not so long that you
can read the whole thing (under a second).

sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.


Reply With Quote
  #10  
Old   
Bernhard Sander
 
Posts: n/a

Default Re: Mixing VFP and System Printing Functionality - 11-27-2006 , 06:01 AM



Hi Gene,

Quote:
Hi Gene,

VFP has a wonky way to set printer orientation: sys(1037). This
is intended for end-user use. I have to use keyboard to use it
programmatically. The flash on the screen is a kludge and a bit
bothersome. My boss recently commented on the latter. Since I am
using set printer on and ? -style reporting, this is what I have to

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

use. How can I get rid of it?

Did you try my idea from oct.13 in your thread "VFP9: Alternative to sys(1037)"
about using the additional parameters of sys(1037)


No, because it does not apply. From the VFP 9 docs on sys(1037):
"All three report-related SYS(1037,<N>) variants require access to a
cursor or open table with the same format as a report (.frx) or label
(.lbx) definition file. The report must be selected as a cursor or
opened as a table before you call the function, and Visual FoxPro
requires the report table to be opened exclusively. Otherwise, an
error occurs when you call the function. For more information about
the structure of report and label tables, see Table Structures of
Table Files (.dbc, .frx, .lbx, .mnx, .pjx, .scx, .vcx)."

Please note that I am not using the Report Writer. That is the
significance of the above caret-captioned text.
I know, that you don't use the Report Writer (neither do I).
I understand the docs, that the necessary cursor with the structure of a report
file is only a vehicle for sys(1037) to transfer values between some storage
area (the cursor) and the internal data structures of the printing system. See
the hint "sets printer settings for the default printer in Visual FoxPro" right
in the first line of the help text of sys(1037). But maybe I'm wrong.

Regards
Bernhard Sander


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.