seifo Posted January 28, 2009 Posted January 28, 2009 Hi All, I have a members & memberships database, there is 2 tables: 1- tbl_Members: Memberid MemberName MemberStatus some other members data (e.g. date of birth, telephone) 2- tbl_Memberships: Membershipid MembershipPeriod Membership Payment Memberid(FK) These two tables are related members(One) membeships (many) as one member can have more than one membership specially when membership expired and he renewed for another membership. What I am trying to do is to build a report to show each member with all the memberships he has whether it's one or more, this is where i'm facing the problem, i tried 2 scenarios: Scenario 1: I build the report and based it on the tbl_members table, when I do this it shows only 1 membership for each member even if this member has more than one. Scenario 2: I build the report based on the tbl_memberships, and grouped the data by memberid, so it's showing fine, but when I try to use a script to show only the members with the "Active" in memberstatus table it doesn't see to filter, here is the script i'm using Go To Layout [tbl_members] Enter Find Mode [] SetField [tbl_members::memberstatus;"Active"] Perform Find[] Enter Browse Mode[] Go To Layout [rpt_MembershipsAll(tbl_memberships)] Sort Records [Restore;No Dialog] Enter Preview Mode [Pause] Enter Browse Mode Go To Layout [Original Layout] Is it because the report is based on tbl_memberships I can't filter on tbl_members::memberstatus;"active" or what? I'd appreciate any help or direction. Thanks.
comment Posted January 28, 2009 Posted January 28, 2009 Two options: 1. Go To Layout [tbl_members] Enter Find Mode [] SetField [tbl_members::memberstatus;"Active"] Perform Find[] Go to Related Record [ tbl_memberships ; Match Found set ] Sort Records [Restore;No Dialog] Enter Preview Mode [Pause] Enter Browse Mode Go To Layout [Original Layout] 2. Go To Layout [tbl_memberships] Enter Find Mode [] SetField [tbl_members::memberstatus;"Active"] Perform Find[] Sort Records [Restore;No Dialog] Enter Preview Mode [Pause] Enter Browse Mode Go To Layout [Original Layout]
seifo Posted January 29, 2009 Author Posted January 29, 2009 The first option worked fine for me. Thanks so much comment for your help, really appreciate it.
Recommended Posts
This topic is 5837 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now