Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variable in report designer
Message
 
 
To
25/07/2001 22:10:02
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00530599
Message ID:
00535496
Views:
16
>Hi,
>
>We assume that I had a report file that had a variable called cCount
>for displaying the count value in the report.
>
>Next, I had this program code that had the above variable cCount declare
>and initialize to maybe 10.
>
>In the past of VFP5, when I do the following below, it work fine.
>
>cCount = 10
>DO REPORT frmDisplay        <---- this report work fine with the cCount
>                                  display as 10 in the report
>
>
>Now in VFP6, when I do the following below, it give me error.
>
>cCount = 10
>DO REPORT frmDisplay    <--------- this report does not work any more
>
Virusim,

I assume, that the above code is just a pseudo-code, because report command should be read:
REFORT FORM frmDisplay TO PRINTER NOCONSOLE
Anyway, perhaps you re-declare your variable somewhere, say, you have report variable cCount in addition to varialbe declared in a program.

For experiment sake, you may temporary declare your variable as PUBLIC and see, if it makes any difference. Say, quite recently we found, that local variables don't work with report commands, while private do, if report is called from the program.
>
>Please advise me on the above problem. Thank you
>
>
>
>
>
>
>
>>Hi Virusim,
>>
>>Could you please provide me with some specific, say, a code, which fails? Otherwise it's really hard to tell.
>>
>>Thanks in advance.
>>
>>>Hi,
>>>
>>>Since we in the topic of discussing report. I had this issue.
>>>In the past of Vfp5, variable created in my form is able to be
>>>use in my report. However, with vfp6, my variable is unavailable
>>>to my report. Please kindly enlighten me on this area. Thank you
>>>
>>>>>Hi,
>>>>> I would like ot count the number of group for my report result to indicate how many user match the condition using report variable. What should I do? I have read HELP, but, I cant understand it.
>>>>>
>>>>>Thank you
>>>>
>>>>Hi John,
>>>>
>>>>I'm not sure, I understand your problem, but you can create a variable, say, numMatch. Put this expression in value to store
iif(myMatchCondition,1,0)
Check Sum in Calculate section. Put this varialbe in the Group Footer. Now you have number of users, which match your criterion. The same way you can sum any numeric field in your table, etc.
>>>>
>>>>If this would not help, send me your report and a sample table with an explanation, what do you want to achieve, to my home address nosonov@msn.com and I will try to help.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform