Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PREVIEW A REPORT WITH FOX 2.6aDOS

Status
Not open for further replies.

Maricus

Programmer
Mar 9, 2001
41
KE
Hi all,
I am grateful for this site. I have just joined today, and I have seen a lot people have discussed that have helped me.
However, I have a problem with one of the programs I developed under Foxpro 2.6a DOS. As you are aware, the report generator, when previewing, does not allow user to move up, down or pan: it allows for forward and left/right movements only. How can I fix this? Are there utilities some is using out there that can be incorporated into the program to permit these functions.

Thanks.
Maricus.
 
Using the REPORT PREVIEW command only allows you to page down the report. As far as I am aware you cannot change the editing/previewing modes and are stuck with Done/More.

However, to circumvent the problem you could output your report to a text file and then view the text file using another text editor.

Issue a command to call a DOS function with either

a) Run Edit MyFile.Txt
b) !Edit MyFile.Txt

should you wish the text file to be read-only you would need
to place a read-only attribute on the text file before opening it with

a) !attrib +r myfile.txt

 
hi
Maricus
i do agree with FoxAl but instead of run edit...
use modi comm myfile.txt noed , command it will help u more

Kunti
 
Back in my early days as a clipper programmer, you could
do it in 2 ways....

after report form to a txt file... then

a) Import it into a memo field... and edit it then
b) Import it into a cursor and use a browse, (actually
dosen't look too bad... at 80 columns)

My only problem I would have with this is all the damn
HP printer control characters I have in my reports, (to make
them all look pretty) would make it un-readable.

Zim
 
Using a DOS command EDIT or MODIFY COMMAND would not be very appropriate because of the difficulty to navigate especially if a report is spanning several pages.

I have tried this before. For instance, though the foxpro's config.fp, your can specify an external editor so that when you use MODIFY command, it uses it (the external program) to edit a file.

Thanks.

What else, guys?
Maricus
 
Most DOS word processors would open a text file.
I had/have a table called sys_user in all my applications that held things about the user. In the DOS days I stored the name of the drive/directory/word processor they liked to use. When I needed to modify/preview a report I collected the word processor info into a memvar and called it with the run command. David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644
 
Try this
IF cPd='P'
SET PRINTER ON
ELSE
DEFINE WINDOW scrnprint FROM 1, 0 TO 24,79 ;
SYSTEM GROW FLOAT ZOOM CLOSE ;
TITLE crTitle ;
FOOTER " Use cursor keys to scroll through report." + ;
&quot;Press <Esc> to exit &quot; ;
SHADOW
ACTIVATE WINDOW scrnprint
DO Center WITH 12, &quot;Building report ... Please be patient&quot;, .T.
SET CONSOLE OFF
mtempfile = SYS(3) + &quot;.TXT&quot;
SET ALTERNATE TO (mtempfile)
SET ALTERNATE ON
ENDIF
mfirstrec = RECNO() && Save starting record
FOR mcount = 1 TO npno
GOTO mfirstrec && first record
* wait window 'in for: gone to first rec'+str(mfirstrec)
REPORT FORM (cRFName) &cScope &ccondit &csum NOEJECT NOCONSOLE
ENDFOR
IF cPd='P'
_PDSETUP='' &&MGdriver1
SET PRINTER OFF
SET PRINTER TO
ELSE
CLOSE ALTERNATE
SET CONSOLE ON
DEACTIVATE WINDOW scrnprint
MODIFY COMMAND (mtempfile) NOEDIT WINDOW scrnprint
DELETE FILE (mtempfile)
RELEASE WINDOW scrnprint
ENDIF
This allows you to move around the report to your hearts content
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top