Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variable
Message
 
To
19/05/2005 01:54:02
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01015673
Message ID:
01015877
Views:
18
>Yup, i got it. Thank you so much. But is that any side effect on performance?Is that the best way to achieve it?
>
>#UPDATE
>I only can solve it by public the variable, for the private variable, i facing the same problem.Anywhere i may use public statement, but i have to release all the variable when my form is close.Thank you!!


I've tried to make it a policy to not use variables (defined outside the report) in a report. Instead I create a cursor that holds miscellaneous information that I want.
create cursor ReportInfo (cTitle c(50))
insert into ReportInfo values (thisform.txtReportTitle.Value)
select ReportTable  &&The table that drives your report
report form myreport preview
Then in your report just refer to ReportInfo.cTitle.

After the REPORT FORM statement above you can just USE IN REPORTINFO to close the cursor if you wish. Even if you don't, the cursor will be closed/deleted when you exit the form (if it uses a Private Datasession).

Anyway, you can do the same with public vars as you mentioned and then RELEASE them after the report if you want to do housecleaning. Cursor are my personal preference, though... I think reports should be entirely based on table data.

--Brad
Previous
Reply
Map
View

Click here to load this message in the networking platform