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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

form not disableing

Status
Not open for further replies.

PeriyurParthi

IS-IT--Management
Jul 18, 2001
258
IN
hi all
i have a report generated thru code and store it to p1.prn file, this report and code is been placed in the click event of command button, after generating p1.prn, i use to display report useing modi comm p1.prn. but i dont know to disable the form, it is still activating before the report, report stand behind the form, solution pls
thanks
parthi
 
Hi Partrhi...
There are a number of ways to do it.

1. ThisForm.Hide can be issued before the Modi Comm command
OR
2. You can do MODI COMM on a window with a modeal form property.
there could be more ways as well.

Instead of modi comm... I suggest you use
REPORT FORM cReportForm PREVIEW IN SCREEN

This will give the reoprt preview with additional facility to Print as well. MODI COMM need to be used only when you want some editing of the report, which is not a good idea.

Hope this helps ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
hi ramani
but how can i use report generation, i have already generated reports using code, is there anyother way instead of useing modi comm,
thanks
parthi
 
general2000

Try MODI FILE p1.prn NOEDIT WINDOW yourformname.

If you want your user to able to modify the file omit the NOEDIT argument, and WINDOW yourformname will effectively replace your form with the edit window.

Using this method means you do not have to hide your form.

The user simply closes the edit window to return to the form.

Alternatively, if you are using a modified SYSMENU and have retained the Window option, the user can dismiss the edit window by selecting the form window, or by cycling to it with CTRL + F1.

You can then print the file through the File menu options.

Chris :)
 
general2000

Just as an observation, the file p1.prn is now a plain text file, stripped of any formatting you provided in the report.

This may be perfectly adequate for the application, but if wanted to improve the presentation of the report by retaining its formatting including any graphics, etc, you could print the report to a PDF document instead.

The report could then be viewed through Acrobat Reader or any another PDF viewer.

Whilst viewing, the report could also be word searched etc and if it's a report with a number of pages, the report could be printed by odd and even pages to form a double sided booklet, (Microsoft Word, why don't you provide that basic functionality?).

It's inappropriate for anyone to endorse or promote a commercial product in this forum but try .

HTH

Chris :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top