Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

PreviousPrevious NextNext


Mark XY Brown 26.May.11 01:37 PM a Web browser
Domino Designer 6.0.3 Windows XP


Hi All

I'm working on an RFC database, and have hit a snag with exporting view totals. I've created a couple of views that summarise completed RFCs and then give counts according to closure code. There's a hidden column that controls the sort order, a categorised column that holds the RFCs' classification and then six computed columns (total RFCs, Incomplete, Successful, Failed, failed/Backed Out, Cancelled). These six all either compute to 0 or 1, and are set to give a sum. The view is set to collapse when first opened.

I've been asked to provide the facility to export the totals as displayed when the view is first opened. According to my reading of the Help file, the view entry properties IsCategory and IsTotal should help me with this.

My script follows:
Sub Click(Source As Button)
'2011-May-26
'Export the category and total rows for this view

Dim ws As New NotesUIWorkspace
Dim vwThis As NotesView
Dim vecThis As NotesViewEntryCollection
Dim veThis As NotesViewEntry

Dim xlApp As Variant
Dim xlSheet As Variant

Dim intCol As Integer
Dim intRow As Integer

'Populate and format the Excel objects
Set xlApp = CreateObject("Excel.Application")
xlApp.Workbooks.Add
Set xlSheet = xlApp.ActiveWorkbook.ActiveSheet

With xlSheet

.Columns(1).ColumnWidth = 12.75
.Columns(2).ColumnWidth = 10.13
.Columns(3).ColumnWidth = 10.88
.Columns(4).ColumnWidth = 10.13
.Columns(5).ColumnWidth = 6
.Columns(6).ColumnWidth = 10.88
.Columns(7).ColumnWidth = 9.38
.Rows(1).Font.Bold = 2
.Rows(1).RowHeight = 25.5
.Rows(1).VerticalAlignment = xlTop
.Rows(1).WrapText = True

End With

xlApp.Visible = False



'Now populate the Notes objects
Set vwThis = ws.CurrentView.View
Set vecThis = vwThis.AllEntries
Set veThis = vecThis.GetFirstEntry

'Set the row headings
xlSheet.Cells(1,1).Value = "Classification"
xlSheet.Cells(1,2).Value = "Total RFCs"
xlSheet.Cells(1,3).Value = "Incomplete"
xlSheet.Cells(1,4).Value = "Successful"
xlSheet.Cells(1, 5).Value = "Failed"
xlSheet.Cells(1,6).Value = "Failed/ Backed out"
xlSheet.Cells(1, 7).Value = "Cancelled"

intRow = 2

'Begin to loop through the entries
Do Until veThis Is Nothing

If veThis.IsCategory Or veThis.IsTotal Then

'Output this entry's values
For intCol = 1 To Ubound(veThis.ColumnValues)

xlSheet.Cells(intRow, intCol) = veThis.ColumnValues(intCol)

Next

intRow = intRow + 1

End If

Set veThis = vecThis.GetNextEntry(veThis)

Loop

xlApp.Visible = True

End Sub

However, this does not export any totals. When I stepped through the code, the If statement never registered True. Also, when I looked at the View Entry Collection properties, it showed the same number of entries as there were documents in the view.

Am I missing something here?

TIA!






View export woes (Mark XY Brown 26.May.11)
. . RE: View export woes (Doug Finner 31.May.11)
. . . . RE: View export woes (Mark XY Brown 1.Jun.11)
. . RE: View export woes (Jo Willems 12.Aug.11)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite