Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variable in report form
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00492913
Message ID:
00492955
Views:
13
>>>>I have created a var in the report form by selecting report/variable.
>>>>Is there a way to display it on the report?
>>>
>>>Just use the variable as the expression of a Field control.
>>
>>I created a field on the report called field1, I created a var called var1.
>>How do I make the varaible = 'TOMATOE' and display it. It doesn't seem to work.
>
>Ok, I'm confused... AFAIK, you cannot name a report field. So, I'm not sure what you're doing there.
>
>If you just want to display a constant value "TOMATOE" use a label control. (from the report controls toolbar)
>
>If you want to use a variable that you set from within your program code before calling the report, just be sure to scope it private.
>
>If you want to define a ReportVariable, (from the Report menu of the Report Designer) you can set the initial value and Value to store on the bottom of the window.
>
>Either kind of variable (or a constant for that matter) can be displayed in a Field control (again from the report controls toolbar) by setting the Expression to the name of the Variable.
>
>HTH,
KINDA HELPS. I get a zero displayed always.
the prg contains:
if fruit = 'grape'
var1='Tomatoe'
else
var1='squash'
endi
repo FORM badrpt

Now again, the report has a variable called var1 and the report expression says 'var1'. But I still get 0. Am I interpretting you correctly?
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform