4 |
The LA Fox DeveloDer Newsletter
|
November 1997
|
SQL Views
(Con't from page 3)
CHANGE LOG:
CHANGED TROUBLE CHANGES
a
ON DATE REPORT# MADE BY DESCRIPTION OF CHANGES
parameters cFIIe
cExt
=
rlght(cFile,3)
cFile substr(cFile, 1, len(cFiIe)-4)
cCode
=
zxinlprs(’c:~wlndows~win’,’extensions’,cExt)
if
empty(cCode)
=MESSAGEBOX(’The application required to view this document has not been setup correctly’, 16, ‘Error’)
return
endif
cCode
=
strtran(cCode,
“,
cFile)
I/ni &ccode
PROGRAM: zxlniPrs
VERSION: 1.0 (Fox 2.6)
CALLD FR: main.prg, and other places
look in SET PATH)
pcSection the section name pcTitle the parameter name
pcDefault a default value if any of the above fail to be found
Note: If no default value given, will return .F.
|
Hot Tips...
Q
How can I replace the default “Microsoft FoxPro” title in an executable?
A (This is applicable to Visual FoxPro as well.) To replace the default ‘Microsoft FoxPro’ in the title bar of the main desktop of your executable, include the following line in your Conflg.fpw file:
Title=Your Title
You can achieve the same effect by including the MODIFY WINDOW SCREEN in your application and by using the keyword TITLE followed by a character string expression for the title. In this approach, however, the MODIFY WINDOW SCREEN command changes the main desktop title only after the executable program has complete control. This means that the Microsoft FoxPro title is briefly displayed in the title bar before it is replaced by the new title that you specified using the MODIFY WINDOW command:
MODIFY WINDOW SCREEN TITLE ‘Mytitle’
U
Is there a simple way of printing a variable number of copies of a report in FoxPro, without running the report a number of times?
A You can use either of the methods indicated below to print a variable number of copies of a report.
Method I
1. .Issue the REPORT FORM TO PRINT PROMPT command from the command window. <file name> is the name of the report you want to print. The PROMPT option in the above command opens a dialogbox
2.Specify the number of copies you want to print (the default is one).
Method II
The system memory variable, _PCOPIES specifies the number of copies you want to print. Here, _PCOPIES
=
where Expn is the number of copies you want. You can print with this variable only when you use it with PRINTJOB
...
ENDPRINTJOB. As such, this variable can be used only
in
FoxPro programs. All you need to do is place the _PCOPIES assignment statement before the PRINT JOB to set the number of copies to print.
|
(Con’t, page
5)
|
Page 4
|
4 |