Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report Print When a Cursor not open
Message
 
 
To
16/07/2012 16:41:59
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01548682
Message ID:
01548685
Views:
44
>>>Hi,
>>>
>>>I would like to be sure that I am understanding one aspect of VFP reports. I have a report where the General tab has teh following:
>>>
>>>MyCursor.FieldName
>>>
>>>
>>>I have the following The Print When expression
>>>
>>>select("MyCursor") > 0
>>>
>>>
>>>I thought that if the cursor MyCursor is not open VFP will simply not print this field. But I get run-time error. Does it mean that VFP report evaluates the General expression of the report before the When?
>>
>>Most likely. Is there a reason to use such an expression? You need to have all your cursors before the report is run.
>
>I was hoping to get away with not have to have this cursor. But now I am changing the design and will have the cursor open even if I don't want to print this field. Keep in mind that this "report" is actually a form print-out (one page). And some sections of this form do not need to be printed.
>Thank you.

The alternative solution may be (needs testing) to use this expression for the field
IIF(used('MyCursor'), myCursor.myField,'')
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