Search DominoPower's 11,323 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
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.


« Previous  ·  1  ·  2  ·  3  ·  4
Other articles you might like
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Five trends for 2010
DominoPower TV Episode 1: Inside a strategy session with Teamstudio
More about Domino log files
Say goodbye to the Uh-Ohs. Long live the Tens.
Why your log.nsf might not be purging properly
Latest Lotus Headlines
Recommended Maintenance - Lotus Notes Traveler
Here are the slides and other materials from our Lotusphere session
Microsoft OCS awareness in Lotus Connections and Websphere Portal?
SnTT: XPages Blank Calendar Control (Part 2), adding data
Have your Lotus Notes calendar display multiple time zones
Sample Database for Microsoft Office and Lotus Symphony Integration
Symphony 3.0 beta signals another attack on Office
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad: Apple's latest heartbreaker
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Running auto-respond rules when Outlook is closed
-- 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.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login