Hi all,
I am looking for a way to change the report name as it is generated, then save it to a file on the c:\
I have been able to change the printer to the correct output via SET PRINTER TO NAME printer name.
Now, I wish to change the reports name and save the report in a designated drive. Here is a sample of my code:
*-- save invoice printout to a file named after the Salesman last name
lcfiltname = "c:\CustRankingRSM_" + ALLTRIM(thisform.lcbsalesmn)
*-- change printer default to PDF converter (must be installed on the desktop)
SET PRINTER TO NAME "Amyuni PDF Converter"
*-- generate report to a file
REPORT FORM custranking2 NOCONSOLE TO PRINTER TO FILE &lcfiltname
*-- clear printer command
set printer to
The code generates the following error message:
"Command contains unrecognized phrase/keywords" when trying to generate the report to a file. (REPORT FORM custranking2 NOCONSOLE...)
If I chose to write REPORT FORM custranking2 to PRINTER PROMPT, the user manually has to enter the report name and designate the path. Which I feel is acceptable, but I would like the program to do it for them.
Any help?
Thanks,
Chad