I'm trying to have my Program (form) create a text file from a report form and I'm having some issues. I'm using VFP 8 and this is the code inside a command button:
REPORT FORM C:\Jobs\Reports\Report.frx NOEJECT NOCONSOLE TO FILE C:\Jobs\Reports\RPT0419.txt ASCII
a) When I execute the command it does run the report and creates a file but it comes up empty. 0 bytes. I'm able to preview it, with the exception of the fields I want it to display, but I can preview it, but I execute the command it creates an empty file.
b) Another issue is that after executing the command to create the report, the Open Dialog box just keeps popping up, even though I press Cancel, it just keeps coming up until I'm forced to close VFP with CRTL+ALT+DEL. It just seems it wants me to create a file. I've also tried that but the Open Dialog box still keeps popping up.
c) I have in the report 3 tables I added to the Data Environment. How to I get a field to print the RECCOUNT() from a particular table. I thought about using inside the Expression box the following: -Table1.RECCOUNT(); -Table2.RECCOUNT(); etc. in each of the fields, but it is not working. I want to print the count of each of the 3 tables and I want it on the report.
d) Last issue, how do I call a variable inside a field of the report? When I run my program, I writing to a variable the file name of the file I choose to run at that particular time and I want the report to have the file name in it and my thought was to carry it with a variable. I have no idea how to call a variable from a field on the report.
Have been trying to get this to work all weekend and have not been able to. The report is just a simple report, nothing fancy. All I have are some labels and the fields I want to use.
Any ideas? Thanks.
REPORT FORM C:\Jobs\Reports\Report.frx NOEJECT NOCONSOLE TO FILE C:\Jobs\Reports\RPT0419.txt ASCII
a) When I execute the command it does run the report and creates a file but it comes up empty. 0 bytes. I'm able to preview it, with the exception of the fields I want it to display, but I can preview it, but I execute the command it creates an empty file.
b) Another issue is that after executing the command to create the report, the Open Dialog box just keeps popping up, even though I press Cancel, it just keeps coming up until I'm forced to close VFP with CRTL+ALT+DEL. It just seems it wants me to create a file. I've also tried that but the Open Dialog box still keeps popping up.
c) I have in the report 3 tables I added to the Data Environment. How to I get a field to print the RECCOUNT() from a particular table. I thought about using inside the Expression box the following: -Table1.RECCOUNT(); -Table2.RECCOUNT(); etc. in each of the fields, but it is not working. I want to print the count of each of the 3 tables and I want it on the report.
d) Last issue, how do I call a variable inside a field of the report? When I run my program, I writing to a variable the file name of the file I choose to run at that particular time and I want the report to have the file name in it and my thought was to carry it with a variable. I have no idea how to call a variable from a field on the report.
Have been trying to get this to work all weekend and have not been able to. The report is just a simple report, nothing fancy. All I have are some labels and the fields I want to use.
Any ideas? Thanks.