Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Message with View
Message
From
31/12/1996 15:59:20
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00016174
Message ID:
00016261
Views:
40
>>>>>>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
>
>you can do the select before calling the report and after the fields have been entered. i would usually not include a view (or cursor) in the data environment of a report so i could avoid this confusion.


Hey, thanks for your help. I took the view out of the data env. and ran the sql from the click event of my form and that works great, but, since I have tons of reports in this project I realized that I can use the INIT method of the data env. to check reccount() (Duh, huh?).

Thanks again
Previous
Reply
Map
View

Click here to load this message in the networking platform