General information
Category:
Reports & Report designer
Title:
Variable disappears after REPORT FORM
I create a temporary table with a random file name. The file name is stored in variable rpt013a (the alias, report name are also rpt013a). After i return from REPORT FORM rpt013a expression can not be evaluated in the debugger. My DELETE FILE does not get an error, but it also does not delete the file. What is the REPORT FORM doing that it wipes out my rpt013a variable. When I return from REPORT FORM all my Watch Window variables are deleted from the window. The testrpt013a variable does not get wiped out. It seems only rpt013a variable gets wiped out.
Also, what is the difference between &rpt013a and (rpt013a)?
thanks
brenda
*** get a temporary random file name
tmp_db_name = rpath+"\tempdbfs\"+left(sys(2015),8)
DO WHILE FILE(tmp_db_name+'.DBF')
tmp_db_name = rpath+"\tempdbfs\"+left(sys(2015),8)
ENDDO
rpt013a = tmp_db_name+'.DBF'
testrpt013a = rpt013a
*** select records into a temporary table
SELECT * FROM custinfo INTO TABLE &rpt013a
*** close then open the table with a meaningful alias
USE
USE &rpt013a IN 0 ALIAS rpt013a
SELECT rpt013a
*** execute the report
_SCREEN.Visible = .T.
SELECT rpt013a
REPORT FORM rpt013a.frx &M_print
*** delete temp table file
SELECT rpt013a
USE
DELETE FILE &rpt013a
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only