Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Message with View
Message
From
31/12/1996 16:01:32
 
 
To
31/12/1996 11:58:54
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00016174
Message ID:
00016263
Views:
32
>>>>>I have a report that is based on a view that uses variables that are selected from a form. How do I return a message if the resultant view doesn't match the selection data that was entered in the form. In the old
>
>
>>RECCOUNT() works fine on a view. I use it all the time. My standard data entry form uses RECCOUNT() to determine whether or not the VCR buttons should be enabled or disabled.
>
>Craig,
>
>I appreciate your comments, and I'm sorry, but this may just be an issue of me still trying to understand the OO programming enviorn. I'm still uncertain as to how to use a view in the way you descibe. Here is a simplified example of my problem:
>
>In my app I have a view (lv_View) where the selection criteria includes a variable, for example:
>
>Year Between ?gnStartYear,?gnEndYear
>
>Ok, I have form where they enter the years. Then it has two buttons, Print, Cancel. If they select print my code is:
>
>Report form ThisReport preview
>
>In the report writer the data enviorn is lv_View and the fields are selected from the view. Where, in this, would I use Reccount(), since I never actually use:
>
>Select * from ThisDBF where ...
>
>I just reference the view in the report writer. Does this make sense?
>
>Thanks again.
>
>Rob

The way I would do it is to disable the print button if there are no records to print. I have a custom method called after skip in my data entry form class. This method gets called whenever the record pointer is moved on the main table for the form (ie: SKIP, GO BOTTOM, etc). It also gets called after I load the view for the form. In AfterSkip, I enable/disable the VCR buttons as needed.

Craig
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform