Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access to Report Variables
Message
From
23/09/2010 00:12:34
Ken Knorr
Logos Management Software
Ventura, California, United States
 
 
To
22/09/2010 23:04:32
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01482365
Message ID:
01482408
Views:
86
>>>>Report variables used to be Global in prior version of VFP including vfp9 sp1. This is not the case i have expressions that call out to an object that does an eval of report expression.
>>>>
>>>>I preprocess reports swapping the expression with a public variable (expression was rpt_get_history("Range",ldBgn, ldEnd)) which is replace with public variable named _u132abc56 for instance. The ldBgn and ldEnd are report variables. So my object does a:
>>>>
>>>>lcVariable = obj.aExpression[1,1] && contains "_u132abc56"
>>>>lcExp = obj.aExpression[1,2] && contains [rpt_get_history("Range",ldBgn, ldEnd)]
>>>>
>>>>&lcVariable. = eval(lcexpr)
>>>>
>>>>and when report renders that field if get data for variable _u132abc56.
>>>>
>>>>How do I get access to the variables ldBgn, ldEnd, I have access to the listener object but am at a loss to figure how to get
>>>>values for ldBgn and ldEnd.
>>>>
>>>>Ken
>>>
>>>You can declare variables local in the procedure calling the report and they will be visible in the report.
>>
>>I'm trying to access variables defined in the Report in a global object. Until sp2 report variables used to be defined as Public.
>>
>>Ken
>
>Actually you need to declare the variables private not local to make them visible in the report.

These variables are DEFINED IN THE REPORT, I'm trying to access them in a object that is called by the OnEntry bands of the report. Before SP2 all Report Variables were defined as Global, now I can't find them. The only work around I have been able to do is to create another Report Variable and set the Value to Store expression: _Vfp.SetVar("ldBgn", ldBgn). I have over 500 reports to check. And I don't have a way to delete the public variable after report is finished running (yet).

Ken
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform