Solved

How to look up subtotals from a view into a form??

Posted on 2004-08-02
5
241 Views
Last Modified: 2013-12-18
Hi Experts,

Is it possible to retrieve/look up sub totals from a view into a form??
===========================================
For Example I have a view with the following values:

User1     10   20   30   40   50  
             10   20   30   40   50
subtotal: 20   40   60   80   100

User2            20         40   50  
             10   20   30   40   50
subtotal: 10   40   30   80   100
===========================================

In Form-A I would like to look up the subtotals for
user1 : subtotal: 20   40   60   80   100

and in Form-B subtotals for
user2 : subtotal: 10   40   30   80   100.

Is this possible??? If so I need your help.

On an other form I am using the following formula to look up data from a view
@Unique(@Text(@DbColumn( "" : "NoCache" ; "" ; "CP1\\CP1-YES1" ; 1))) but I do not know how to look up subtotals.

Thanks in advance for your help.

0
Comment
Question by:chinnaji
  • 2
  • 2
5 Comments
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 11695496
You LotusScript to manually generate the subtotals.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 11695522
Use NotesViewNavigator.  If you create a NotesViewNavigator that includes the view entries you want, then it will include catgeory entries and the final totals view entry.  You can then use the NotesViewEntry.columnValues to retrieve the totals.

you can also use @DbCOlumn, but that is much more of a pain inthe neck.  @DbLookup does not return totals, but @DbCOlumn does.  Problem is, that returns all values in that column in the view, and you then have to piece it back out.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 11695553
Besides, with @DBColumn, you run into the rick of crossing 64K limit.
0
 

Author Comment

by:chinnaji
ID: 11695618
I have never used a notes View Navigator .. Can you please provide me an example for NotesViewEntry.columnValues.??
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 75 total points
ID: 11697532
This will get the column totals from the last row of the view, if you set hide detail on for your totals:


Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim entry As NotesViewEntry
Dim nav As NotesViewNavigator
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set nav = view.CreateViewNav
Set entry = nav.GetLast

Dim i as integer
For i = 0 to ubound(view.Columns)
    if view.Columns(i).isHideDetail Then
        print view.columns(i).title "total value:" entry.colulmnsValues(i)
    end if
Next
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question