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

report not printing cursor correctly

Status
Not open for further replies.

paulthibodaux

IS-IT--Management
Apr 4, 2002
20
US
I have created a cursor which is displayed in a grid. The grid is correct but when I print the cursor to a report the report has either one record in it or the correct number of records but their all the same. This is printed from "report form "xxx.frx" noconsole to printer prompt. I have created a new (simple, just a few fields) report and it does the same thing. I've done many reports the same way but this is the only one that seems to act odd. I'm using FoxPro 6.
 
1.You may have the wrong table select, so before using report form use SELECT myCursor
2. The fields that you put on the report should be in the detail band.
 
I have selected the cursor before the "report form" command and also I've selected the cursor and given a go top in the init of the report itself. This thing is acting different each time I run it, very strange...
 
Paul

Try a little exercise. Create a program and put this in it :
Code:
CREATE cursor myDetail (accno c(1),part c(20),price n(10,2))
INSERT INTO myDetail (accno,part,price) VALUES ("1","Widget1",2.00)
INSERT INTO myDetail (accno,part,price) VALUES ("1","Widget2",4.00)
INSERT INTO myDetail (accno,part,price) VALUES ("2","Widget1",2.00)
INSERT INTO myDetail (accno,part,price) VALUES ("2","Widget3",5.00)
INSERT INTO myDetail (accno,part,price) VALUES ("3","Widget1",2.00)
INSERT INTO myDetail (accno,part,price) VALUES ("3","Widget4",10.00)
INSERT INTO myDetail (accno,part,price) VALUES ("3","Widget6",22.00)
GO top
SCATTER memvar
MODIFY REPORT C:\myReport
A this point create three text fields and when it comes to the expresssion press the little button at the end and go and find the "accno" for the first, the "part" for the second and the "price" for the third (on the variables side). And hit the preview button on the toolbar. Save the report and modify it and see the difference between this one and yours.
 
you could browse the cursor just before the print just to see what's in it.
 
Are you referencing the fields on the report with the wrong table/cursor alias?

I did this the other day and it took me hours to spot it! The same record was being repeated on the report, although the correct cursor was selected before the report, seemed fine etc. "I love work. I could sit and stare at it for hours..."
 
The cursor is displayed in a grid and is fine. I built a new report (minimal), removed the grid from the cursor all with the same results. I have put this problem asside for now but have still found no solution. Thanks to all for your help.
 
I had a similiar problem. Copy the cursor to a table. used the table and my problem was corrected. I still don't know why your or mine did not work. But had had all I could stand of a problem that should not be happening.

Let me know if this work around worked for you.

betty
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top