Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update/save a cursor?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00361483
Message ID:
00361500
Views:
15
I don't see where you're adding a new record to the Rpt2 cursor, which means when you REPLACE, you're on the phantom record. What are you trying to do here? Do you want one record in Rpt2 for each record in Rpt? If so, why not just add that field to the Rpt cursor in the first place?
SELECT firstfield, IIF(firstfield='OT','OTHER',SPACE(5)) AS secondfield...


>I do a SELECT and build a cursor called RPT for my report. Then I have to SCAN... ENDSCAN that cursor to change some coded fields to textfields of longer length. So I created a second cursor that defines the result fields' type and width. How can I save the second
>cursors' fields. For example: firstfield is Char 2 in mytable
>
>SELECT firstfield FROM mytable INTO CURSOR rpt
>CREATE CURSOR rpt2
>(firstfield c(30))
>SELECT rpt
>SCAN
>DO CASE
>CASE rpt.firstfield = "OT"
>REPLACE rpt2.firstfield WITH "OTHER"
>ENDCASE
>ENDSCAN
>Then I call my report .FRX file. It doesn't seem to retain the rpt2 cursor. What am I doing wrong? It doesn't show in the report even thought some fields for rpt show in the report, rpt2 fields don't show in the report. I checked into it and did a browse after the SCAN ENDSCAN and CURSOR rpt2 is blank.
>
>Thanks for the help.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform