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

help debugging a report 2

Status
Not open for further replies.

Judi201

Technical User
Jul 2, 2005
315
US
Hi!

I am creating a cursor and calling a report built in the Report Designer. Tracing in Debug I get to the call for the report and then a syntax error. The report preview appears with a blank page. Modifying the report, I can't see anything that looks wrong. How can I "debug" the report? VFP 6.0

Thanks for any suggestions.

Judi
 
Hi

I should add that I read the earlier post on debugging a report but hoped that someone arround here now might have some suggestions. Doesn't hurt to hope![smile]

Thanks for all

Judi
 
Hi Don

All I get is a syntax error as the debug line indicator rest on the call to the report. The report preview shows a blank page and nothing in debug window.

Any ideas?

I started deleting one item at a time (after a backup) and when I had deleted all of the fields and labels (just had a blank form in report designer) I still get the syntax error!
Thought that might get a chuckle from anyone who has been there. I would like very much to learn how to find this. Only thing that I know that has changed since this worked correctly is that the cursor has changed but I modified the fields to reflect the change. I don't know where to look for a syntax error with nothing showing in the designer. I have not tried hacking anything as you guys do!!!

Truly appreciate your time and help.

Judi
 
My usual approach to debugging a report is to insert a SET STEP ON immediately before the REPORT FORM command. Then execute the program from the Command Window.

When the program does its BREAK and launches the Trace Window, I mouse back over to the Command Window and issue a MODIFY REPORT <my report> command to bring up the report form.

With the Report Form open in the Modify mode I do a View Preview from its top menu.

When an error is encountered, the problematic field's Expression window will open and it can be handled at that time.

Additionally since the program is suspended with the report table(s)/cursor(s) open, it too can be examined to confirm correct field name references, etc.

Good Luck,
JRB-Bldr
 
Hi Judi.

How can I "debug" the report? VFP 6.0

Make a copy of the report. Then start removing objects one at a time until the error goes away. If you are lucky, it will be the last object you removed that has the syntax error.

The most likely culpit is probably a "print when" expression or a complex expression for a controlSource.



Marcia G. Akins
 
Hi!

Thanks for the response. I will try both suggestons and let you know. I have never had problems with report designer before.

Marcia, I had tried your suggestion but when I had removed all objects I still got the 'syntax error'. Don't know what that leaves to look at! Will try JRB-Bldr's suggestion with a copy of backup and see what I can do with that.

Judi
 
JRB-Bld

Amazing!! It took one minute (or less) to find and fix the problem. I learned a valuable lesson today. Many thanks for the help.

Judi
 
Hi Marcia,

When I opened the report with modi report in the command window it immediately showed me a variable only partially define(an error in the definition). I had removed all objects from the form but apparently the variables I had defined were still available and causing the problem. I hope I understand this right. I added the ',2' needed in the 'round' function and it worked fine so I went back to a backup and found the variable and fixed it. I don't know why I could not see the variable when I opened it through the report designer before. Maybe I just overlooked it.

Thanks for all of your help the many times you have come through for me. I hate to think of where I would be without this forum. You pros are the best!!!

BTW, I apologize for not explaining before.

Judi
 
Just want to point out that easier than putting SET STEP ON in your program is setting a breakpoint on the line with the REPORT FORM command. Makes clean-up simpler.

Tamar
 
Tamar,

Thanks for the response. I use 'set step on' most of the time because I just don't seem to 'get' using breakpoints. I know how to set the breakpoint but I must not have something set up right because after I double-click to remove it everything seems to lock up too often and I have to reset the machine. (When I say lockup I mean debugger, VFP, windows - everything.) Wish I could find out what I am doing wrong.
Any ideas?

Appreciate your remarks and I will continue to look for a solution.

Judi
 
In the development environment, when your Program/Form/etc. is open on-screen, go to the VFP Top Menu and go to Tools | Breakpoints...

In Breakpoints..., you will see all of the remaining breakpoints listed. Click on the Clear All button to remove all of them from your program/form.

If your program continues to "lockup" then it must be coming from some other reason.

Good Luck,
JRB-Bldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top