Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variable in report form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00492913
Message ID:
00492958
Vues:
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?

Ok, drop the report variable. If you look at it the Inital Value and Value to store probably say 0. That's where the 0 comes from.
Bill Armbrecht
VFP MCP
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform