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

Report Hangs System

Status
Not open for further replies.

casajarm

Programmer
Jan 12, 2001
16
0
0
US
I have a report in my Foxpro 2.6a project that suddenly quit working. It just hangs there and I have to force quit.

I tried to debug but in debug mode it works fine. I recompiled and tried again but no luck.

I then moved the new executable out to a new program folder with minimum files needed to run and it works.

All my other reports run fine while running the exe from directory containing source code and there have been no changes to the screen or report code involved. Is there some other resource that is being used that causes the program to hang on this one report?
 
casajarm,

Basically - I need more info.

Does the EXE "hang up" just as the Report is to be printed?

Do you have an error trap routine in the App?
What does it report?

Is the REPORT included in the Project? If yes, have you tried NOT INCLUDING it?

harryjr
 
Whether I print or preview the program gets right to the line that includes "report form ...." and that is where I get the hourglass. There is an error handler but no errors are reported and if I run in trace the report works fine.

The report is included in the project but there are no report files included in the delivered application. If I remove it then the executable will have no report template to work with.

I'm not sure if it is a common practice but this app first gets information about the report from a table, it then makes a copy of the report definition in specified directory and then finally issues "report form" against the copy. All the reports are run with the same code, only things that change are the underlying data, report template and the name of that report template.
 
There are a few threads in this forum about this. You may want to do a search for it.
Anyway, here is one I found that might help you
thread182-22295 David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644
 
I looked at other threads before posting but none seemed to fit (solution not problem). I tried recreating the report by cut and paste as well as by replacing it with an older version in which it worked (older compiled versions still print this report, even in the directory which is causing my problem).

I tried to recompile without report but it needs it. I tried recompiling with report in it but then moving report out of project directory but still it freezes.

I can run the report but only if I use the executable in a directory other than the one with source code or I run it inside of Foxpro. All my other reports work either way though.

The current situation is good enough for me to move on but I would like to solve in case other reports start doing the same thing.

I appreciate the help. Glad to find others working in Foxpro 2...
 
I compile my reports into the project also but only as reference only. I run the exe from the application root directory or local hard drive and keep all the report forms in a sub directory under the application root and isolated from the application.
(Example
Application root = x:\bidsys
Report forms = x:\bidsys\reports
Screen/forms = x:\bidsys\screens
Databases = x:\bidsys\dbfs
etc
In the application I have constant memvars pointing to the subdirectories
ccSysRpts = "X:\BIDSYS\REPORTS\"
ccSysDbfs = "X:\BIDSYS\DBFS\"
etc
when I need a report I do
report form (ccSysRpts + "Customer.FRX") to print

This way you can place the EXE any a local drive for faster speed and still call the network reports/databases/screens etc. Needless to say the directory where the reports sit must be flagged as sharable.

The other thing I do is set each user to their own resource file. At the start of the application I do a
use x:\bidsys\biduser (a duplicate of a foxuser.dbf)
copy stru to c:\bidsys\biduser
use
Set Resource to C:\bidsys\biduser.
This stops foxpro from having 2 people accessing a common foxuser file with different printer configurations.

Or if you have one foxuser file in the main directory you might trying to change the file attribute to read only so foxpro will not try to write to it. You may want to check the size of it and zap it first before you attrib it.

Hope is helps you David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top