I use two tables. The first one is simply a list of member names, "NAME"
The second contains the giving information; NAME, DATE,AMOUNT, ALLOCATION,RECEIPT# & YEAR
The field NAME is the relationship link.
Fields are filtered in the prtal setup to show only a specific YEAR.
Based on S Chamblee's sample, you need a Summary field in your Donations table to summarise the Amounts, then place a field on each tab, but not in the portal, DonationsByYear::sum.
And on the ALL tab, use Donations::sum
I must be missing something.
I can get the 2013 total OK, but when I insert to TotalbyYear field in the other tabs it still only shows the 2013 total!
I added a "Year to View" field to my Donor database just like in the sample, but because I have thousand of records, used a calculation field to insert the data Year(Date).
Bloody frustrating !
I think you should rethink the design of your layout. Using tabs like this will require that you add a new tab once a year.
You can set up a portal with a drop down list for selecting the year placed just above it. Then you don't have to add a new tab each time, just select the year from the drop down.
I updated my sample to total the donations by donor / year. I also created a second layout using the drop down list that Phil suggest. I agree with Phil, the drop down list is the way to go. You can enter the date or select from a list. Each new year will be added to the list as you enter a donation for that year.
Link to sample
Your sample looks good, but when I try to adapt it to my case I keep getting an error message.
Lies in (1) you have a test database of just a few recordcs, mine is 34000. (2) your "This Year to View" field is manually entered, mine is a calculated field using the Year(Date) caculation.
I can your sample to work only by using the Year as a Find field.
Even so, the total doesn;t seem to work for me.
Fear not I will battle on.
Here are a couple of more screen shots of my relationships & table
And the relationships
Your relationships look correct. Donor::Name=GivingToView::Name and Donor::YearToView=GivingToView::Year_Donation.
1. Donor::YearToView is not a cacluation field. This is your drop down field with a list based on your calculation field. I think this is part of your problem.
2. The total is a summary field, when you displays your total you will use the same table occurance that you use in your portal. GivingToView::Totals
Great, got it all sorted except one minor flaw.
The total only appears after I click on the layout! It does not automatically appear until I click.
Otherwise, everything else works just great.
Got the thing to work, looks good.
One minor flaw; my TOTAL does not appear until I click on the layout after selecting the year to view.
You need Commit/Record Request check no dialog and Refresh Window and check Flush cached join results. I'm not sure how you handle new transaction, but you may need to use a script trigger. Such as onObjectExit.
Brilliant, saw how you did it in your sample.
Everything works like a dream