Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lost variable
Message
From
14/08/2007 14:11:19
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Lost variable
Miscellaneous
Thread ID:
01248107
Message ID:
01248107
Views:
70
I have the following code in a menu pad of my application.
local lnOldWorkArea
lnOldWorkArea = select()
set reportbehavior 80

select ledger.*, tip.st_name, sponsor_id,getRTAElementNumber(sponsor_id) as ID1,;
	asc(left(GetRTAElementSuffix(sponsor_id),1)) + asc(substr(GetRTAElementSuffix(sponsor_id),2,1)) as ID2, ;
	element, subElement ;
	from tip ;
	left join ledger ;
	on tip.tip_id = ledger.tip_id ;
	inner join rta_basedata ;
	on tip.tip_id = rta_basedata.tip_id ;
	where 'RTA'$sponsor_id and source='RTA' ;
	order by ID1,ID2 ;
	into cursor crsTemp

report form rta_financial_summary to printer prompt preview noconsole

use in crsTemp
select(lnOldWorkArea)
The code works fine with no trouble if it is highlighted and executed from the code window. However when run from the menu during program execution, it will bring up the preview of the first page of the report and then error when navigating to subsequent pages. The error says 'Variable "Element" is not found.' "Element" is a field in the cursor and is printed in the report and is used for grouping in the report. Any idea what gives and why it would work in one instance and not the other?

Thanks
Next
Reply
Map
View

Click here to load this message in the networking platform