Good Day Folks,
I have a report that is run against a view with 2 sorted columns. The code behind the button will not for some reason return a NotesViewEntryCollection even with the keyarray hardcoded. The applicaple code is pasted below:
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim session As NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim vc As NotesViewEntryCollection
Dim EntryOne As NotesViewEntry
Dim doc As NotesDocument
Dim holdTrackStartDate As Variant
Dim holdTrackEndDate As Variant
Dim holdTrackerName As Variant
Dim currentDate As NotesDateTime
Dim holdDate As Variant
Dim holdType As Variant
Dim tmpCount As Variant
Dim tmpCount2 As Variant
Dim countPremises As Variant
Dim countTechnology As Variant
Dim countOrder As Variant
Dim countTOS As Variant
Dim keyarray(1) As String
Dim filenum1 As Integer
Dim uidoc As NotesUIDocument
Set session = New NotesSession
Set db = session.CurrentDatabase
Set uidoc = workspace.CurrentDocument
TrackerName = uidoc.FieldGetText("TrackerName")
StartDate = Cdat(uidoc.FieldGetText("TrackStartDate"))
Set currentDate = New NotesDateTime(uidoc.FieldGet
filenum1 = Freefile
szFilename = Chr(0)
szTitle = "Select a Save File"
szFilter = "Text Files|*.txt|"
If NEMGetFile( 0, szFileName, szFilter, szTitle) <> 0 Then
Answer = Messagebox("Are you sure this is the file: " & szFileName & "?", 4 + 32, "Continue?")
If Not Answer = 6 Then
Messagebox( "Execution of this agent is ending due to cancellation." )
Exit Sub
End If
End If
Open szFileName For Output As filenum1
Write #filenum1, "Technology Report"
Write #filenum1, " "
Write #filenum1, "Name: ", TrackerName
Write #filenum1, "Start Date: ", Format(StartDate, "Long Date")
Write #filenum1, "End Date: ", Format(EndDate, "Long Date")
Write #filenum1, " "
Write #filenum1, " "
Write #filenum1, "","Facilities ","Technology ", "Hardware/Software Order ", "TOS Call Retrieval Request ", " Totals"
TotalPremises=0
TotalTechnology=0
TotalOrder=0
TotalTOS=0
TotalTotal=0
countPremises = 0
countTechnology = 0
countOrder = 0
countTOS = 0
tmpcount=0
tmpcount2=0
keyarray(0) = "Kari Appleton"
'TrackerName
While currentDate.DateOnly <= EndDate
Set view = db.GetView("vDT")
keyarray(1) = "02/27/2007"
'Cstr(currentDate.DateOnly)
Set vc = view.GetAllEntriesByKey(keyarray)
If vc.Count > 0 Then
Despite the fact that on 2/27/2007 there are 2 entires for Kari the vc is empty… Am I assigning the array incorrectly?? I have used getallentriesbykey before without issue, but I cannot determine what I am missing in this code.
Any pointers appreciated.
Ken