SetFilter on Detail Table in M-D Form

SetFilter on Detail Table in M-D Form

Post by Cathy Fisch » Sat, 27 May 1995 04:00:00



We have tried and tried to get this to work and it seems like it won't
and we don't know why.

We are trying to use SetFilter to filter a detail table in a Master
Detail form. It doesn't give an error but it doesn't work either. There
is a secondary index on the field that we are trying to filter on. It
works if we make that Detail table standalone and filter it so it seems
to have something to do with it being in a master detail relationship.

Can anyone tell me if this is true and if so, why? Can you tell me how to
get around this and make it work? We have to be able to edit this table
that we are filtering so a query won't work.

Thanks in advance.

 
 
 

SetFilter on Detail Table in M-D Form

Post by Kuo-Sheng (Kas » Sun, 28 May 1995 04:00:00


: We are trying to use SetFilter to filter a detail table in a Master
: Detail form. It doesn't give an error but it doesn't work either. There
: is a secondary index on the field that we are trying to filter on. It
: works if we make that Detail table standalone and filter it so it seems
: to have something to do with it being in a master detail relationship.

: Can anyone tell me if this is true and if so, why? Can you tell me how to
: get around this and make it work? We have to be able to edit this table
: that we are filtering so a query won't work.

Okay, let me see if I understand your concerns:

You have a MASTER--->>>DETAIL relationship

MASTER--->>>DETAIL is based on KEY1

But you're trying to filter DETAIL with a DIFFERENT KEY, KEY2?

That won't work since that is not the active key/index.

If I misunderstood you, please post your table/key structure.

If you are using 5.0, you can use setGenFilter, which can filter on
anything, but is, of course, slower.

--
+==========================================================================+
| Kasey K. S. Chang (a guy)           Good Paradox for Windows Programmer  |

| http://userwww.sfsu.edu/~kschang    X-COM Guru, general PC expert        |
| Editor of XCOM and XCOM2 UN-official Strategy Guide -- FREE!  (See URL)  |
+==========================================================================+

 
 
 

SetFilter on Detail Table in M-D Form

Post by Cathy Fisch » Fri, 02 Jun 1995 04:00:00



Quote:>Okay, let me see if I understand your concerns:

>You have a MASTER--->>>DETAIL relationship

>MASTER--->>>DETAIL is based on KEY1

>But you're trying to filter DETAIL with a DIFFERENT KEY, KEY2?

>That won't work since that is not the active key/index.

>If I misunderstood you, please post your table/key structure.

>If you are using 5.0, you can use setGenFilter, which can filter on
>anything, but is, of course, slower.

It looks like you understood my problem correctly but I still don't see why
I can't do this. I have used switchIndex on my detail table to use the
secondary index for filtering but that doesn't work. I must be doing
something wrong because the software has got to let you do this. Here is
an example of what I want to do:
   Master.db
    *ID      N  
     Lname   A25
     Fname   A15

   Detail.db
    *ID      N
    *DateOfPmt D
    +MethodOfPmt A2 (C=Cash, CK=Check, CR=CreditCard)
(*=Primary Index field,  +=Secondary Index)
I want to have a screen that shows the persons name at the top
and then the dates of payment and method of payment but I want to filter
method of payment, ie. only "CK".

I am using PdoxWin4.5 but *may be* upgrading to 5.0 soon but still don't
want anything slow.

 
 
 

SetFilter on Detail Table in M-D Form

Post by Kuo-Sheng (Kas » Fri, 02 Jun 1995 04:00:00



: >Okay, let me see if I understand your concerns:
: >
: >You have a MASTER--->>>DETAIL relationship
: >
: >MASTER--->>>DETAIL is based on KEY1
: >
: >But you're trying to filter DETAIL with a DIFFERENT KEY, KEY2?
: >
: >That won't work since that is not the active key/index.
: >
: >If I misunderstood you, please post your table/key structure.
: >
: >If you are using 5.0, you can use setGenFilter, which can filter on
: >anything, but is, of course, slower.

: It looks like you understood my problem correctly but I still don't see why
: I can't do this. I have used switchIndex on my detail table to use the
: secondary index for filtering but that doesn't work. I must be doing
: something wrong because the software has got to let you do this. Here is
: an example of what I want to do:
:    Master.db
:     *ID      N  
:      Lname   A25
:      Fname   A15
:    
:    Detail.db
:     *ID      N
:     *DateOfPmt D
:     +MethodOfPmt A2 (C=Cash, CK=Check, CR=CreditCard)
: (*=Primary Index field,  +=Secondary Index)

: I want to have a screen that shows the persons name at the top
: and then the dates of payment and method of payment but I want to filter
: method of payment, ie. only "CK".

Show only CK WHILE the primary key is in use?  Okay, here's the deal,  
Paradox cannot filter on a NON-primary index when primary index is in
use, and being linked by primary index means it must be in use.

You can fix this by INCLUDING the methodofPmt in the primary index, and
use setrange("101","1/1/95","CK","CK").  You don't need that secondary
index at all.

: I am using PdoxWin4.5 but *may be* upgrading to 5.0 soon but still don't
: want anything slow.

--
+==========================================================================+
| Kasey K. S. Chang (a guy)           Good Paradox for Windows Programmer  |

| http://userwww.sfsu.edu/~kschang    X-COM Guru   General PC expert       |
+--------------------------------------------------------------------------+
| Editor of XCOM and XCOM2 UN-official Strategy Guide -- FREE!  (See URL)  |
+==========================================================================+