Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Counting records in a grid?
Message
From
08/08/2001 09:43:31
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
08/08/2001 09:40:14
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00541182
Message ID:
00541234
Views:
16
>>Hi,
>>
>>I deleted the replies to my previous question about how to determine if a grid with child records ise empty or not. I got the tip to use RECCOUNT() - which it turned out I had already tried, and found that it always returns the total count, regardless of the number of records actually showing du to the relation to a parent table.
>>
>>As I write this, I get the idea that I might perhaps work around this by setting a filter on the child table (set filter to recId = masterfile.recId) before counting, and then resetting the filter.
>>
>>Another problem that I got a reply to was about how the picture buttons from wizards do not show the pictures when running the compiled application alone in its intended folder, while it works allrigt when running from within VFP.
>>
>>I tried copying the .bmp's and changing the default directory in the picture buttons class, but it did not work.
>>
>>Rolf
>
>Rolf,
>A relation was in effect :)
>First do not set a filter.
>If relation is that simple just issue :
>
>
select cnt(*) ;
> from myChild ;
> where recId = masterfile.recId ;
> into array arrCount
>return arrCount
Cetin

BTW this might have problem if you're adding to grid and buffer is in effect. In that case you might save recno(), count for recid=master.recid and return to saved rec. (might be poroblematic depending on where you call it, table rules ...)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform