mkrausnick
Programmer
This is a re-posting of a previous thread that disappeared before I could view responses.
I created the following specialized report printing function in a (VFP 9) PRG to be able to generate PDF files, handling the various Acrobat versions:
As you can see, I pass the report name and scope as a parameter and then reference it via macro substitution.
If the parameter refers to a #DEFINE defined in DEFINES.FH, the program gets a "variable not found" error.
For example, I passed p_ReportString as "reports\statusletter FOR prov_id = ACMC_ID" where ACMC_ID is defined in DEFINES.FH. The calling program errored with "Variable ACMC_ID not found".
Is there a trick to this, or does this not work in VFP?
Mike Krausnick
Dublin, California
I created the following specialized report printing function in a (VFP 9) PRG to be able to generate PDF files, handling the various Acrobat versions:
Code:
#INCLUDE DEFINES.FH
FUNCTION PrintPDFReport(p_ReportString,p_FileName)
.
. some setup code
.
IF g_AcrobatVersion > 5
REPORT FORM &p_ReportString. TO FILE (p_FileName+".PS")
ELSE
REPORT FORM &p_ReportString. NOEJECT NOCONSOLE TO PRINTER
ENDIF
.
. more code
.
If the parameter refers to a #DEFINE defined in DEFINES.FH, the program gets a "variable not found" error.
For example, I passed p_ReportString as "reports\statusletter FOR prov_id = ACMC_ID" where ACMC_ID is defined in DEFINES.FH. The calling program errored with "Variable ACMC_ID not found".
Is there a trick to this, or does this not work in VFP?
Mike Krausnick
Dublin, California