Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem using a procedure in a VFP5.0 Report
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00116657
Message ID:
00116669
Views:
11
>I am having a very strange problem and hope someone else may have come across this and have a solution, other than writing the report in code.
>
>I have a table which has a date column in it (a birthdate), but need to display the person's age (DATE() - Birthdate), with a few calculations to get it right. That is, the subtracting the date from the birthdate may give the incorrect age, depending on which side of the birthday the current date is. To get around this, I created a procedure to which I pass the date field from the table. The procedure simply returns an age. This is then put on the report. If I preview or print the report all is well and the age is correctly displayed. As well, as long as the "Set procedure to " has been activated, typeing "? age(tablefield) returns the result.
>
>However, my client would like to have the output of the report go to a file. When I attempt to output the report to a text file (e.g. report form formname to file Filename ascii) all the other fields look fine in the text file, but the one calculated field (procedure) gives no error messages but does not print. The data is simply not in the file.
>
>Any ideas?

I don't have any idea what's causing the problem with the file, but can you use a cursor for the report data with an AGE field filled with your procedure?

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform