|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating dynamic reports for the Notes client that go beyond embedded views (continued)
Now conduct the search and place the requested documents into the Folder.
'Grab an initial selection of documents based on the status and dept selected
Set coll = db.FTSearch (qry, 0)
'Now search for documents in our collection with the date range specified.
'Put the documents you want into your folder.
If coll.count > 0 Then
For x = 1 To coll.count
Set doc = coll.GetNthDocument (x)
Set item = doc.GetFirstItem( "EffDate" )
'where EffDate is the date field you are searching on in the documents
Set effDate = item.DateTimeValue
If Not(effDate Is Nothing) Then
minDiff = minDate.TimeDifference (effDate)
maxDiff = maxDate.TimeDifference (effDate)
If ( minDiff <= 0 ) Then
If ( maxDiff >= 0 ) Then
Call doc.PutInFolder ("BR")
End If
End If
End If
Next
End If
|
Take care of some housekeeping and refreshing.
Call uidoc.FieldSetText ("RanAgent", "1")
Call uidoc.refresh
|
Save your completed agent.
The final results
Figure E shows you what the Report looks like to the user after he or she presses the "Run Report" button.
FIGURE E
 
This is the Report after the user runs the agent. Roll over picture for a larger image.
The "Grand Totals Report" uses the same setup as described for the "Basic Report," only it contains a table of "Grand Totals" based on the data displaying in the report. This table appears right before the Embedded View.
In my example, I want to count how many documents are listed in the Report, so in my code, every time I add a document to the Folder, I increment a variable called "totalDocs" by 1. After the agent loop completes, the "totalDocs" variable is copied to a field in my "Grand Totals" table on the Report form.
I also created a "Total Price" amount by grabbing a price off each document before putting it into the Folder. I added this price to a "totalPrice" variable and then copied that value to a field in my table.
The table makes it nice and easy for my users to quickly find the totals they need by separating it from the details in my Folder.
I hope I have given you some tools and ideas to help make your users happy by filtering the data in more efficient ways.
Kim Reddington is the President of Deluxe Technologies, is a Principal CLP and has been a Lotus Notes Developer and Consultant since 1995. She can be reached via email at kreddington@deluxetechnologies.com, or you can view her company website at http://www.deluxetechnologies.com.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done.
Native to Lotus Domino. The User Experience unseen for Lotus Domino.
Do more with less. Really.
See the possibilities Docova unleashes for Lotus Domino. |
-- Advertisement --
Integrate your Notes Applications with Microsoft Office and Symphony
Integra for Notes Integrates Microsoft Office and/or IBM Lotus Symphony
Requires NO change to the design of the appliation or Installations of DLL's and EXE's
- Integra is a ready to use solution, enhance static reports with Excel data analysis, pivot tables, macros
- User friendly aproach, using a point and click access to features
- Reports from any Lotus Notes databases
- Runs reports through a Notes client, web browser and scheduled basis
- Allows use of LotusScript for advanced data manipulation
- Enables self service reporting capabilities to end-users
Learn more at www.integra4notes.com. |
|
|
|
|
|
|
|
|
|
|