开发者

Working with categorized Views with totals in Lotus Notes Designer

I have two forms with two views. That needs to access data from one another.

I have a view that has been categorized and computes the total value per data. My problem now is, on a separate view, I need to extract the subtotals from view #1.

For Example;

On View #1, I have columns named Country (C1), State/City (SC) and Population (P1). So I have multiple State/City that are categorized by Country.

On View #2, I have columns named Country (C2) (different field name from View #1) and Population 2009 (P2).

Now I need to get the total from View #1 per Country. That needs to appear side by side on the same level as View #2 and do subtraction on the 3rd column. I can't seem to rack my brain how to do it. Since I'm using two different forms.

Sample View:

View #1 (taken from Form #1)

Country State P1

Japan

Tokyo 100 Kyoto 150 Yokohama 200

450 (total computed by Lotus Notes)

Philippines Manila 100 Cebu 200

300 (total computed by Lotus Notes)

View #2 (taken from Form #2, except Population 2010 (P1))

Country P2 P1

Japan 200 450

Philippines 200 300

Hope you guys can help me. I'm a new开发者_开发百科bie in this. Thanks in advance!


You don't state the client version or whether this is for the web or not, but in a "vanilla" Lotus Notes client application, one view cannot reference the content of another. End of story. So you need to think around what it is you're doing, and how else you can accomplish this. One approach would be to store the totals data in the document(s) referenced in view 2.

For example, if you structure your design so that you have a "summary" document for each country, this could then be updated from view 1 (with the country / state data) by doing a simple view "skim" (check Designer help on NotesViewEntryCollection and related classes). You would then reference these summary documents in view 2.

If you are using XPages in the Notes client (i.e. you're on 8.5 and above), then you can perform view "joins" of a sort (you can present a data view, and have that view perform look-ups elsewhere). I will leave someone else to explain that if it's an option for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜