Lotus Notes — рабочий инструмент программиста.

Обсуждения программирования на Lotus Notes/Domino

Archive for Октябрь 29th, 2008

Enabling Drag and Drop on a Calendar in a Browser

без комментариев

Написано lotusnotes

Октябрь 29, 2008 в 9:12

Опубликовано в Lotus Notes

Dashboard example (realtime data into graphs using RMchart)

без комментариев

In this sample application I show you how you can use RMcharts in an Lotus Notes Dashboard application. You need to download RMchart at http://www.rmchart.com/ and install it on your PC (a restart is required). Make sure the files RMchart.ocx and RMchart.dll are installed in your windows\system32 directory. RMchart is completely freeware. Go to the website for more information. I created this application because I could not find any free product to create realtime graphs from (view) data within Lotus Notes. Finally I found this software and this made my work a lot easier. No more excel and no more exports needed. This is a completly free solution and I think it works great. If you would like to use RMcharts in a real application make sure your users have the RMcharts installed. You could copy above files manualy or automatic via an script to windows\system32\ directory and use ‘regsvr32′ command line program to register the .ocx file in Windows. This database contains a view for the sales sample data and a lookup view I use to quickly & dynamic get the values to display in the charts. The dashboard form contains the embedded activex elements and all the code I used to get the data and display the data in the embedded activex elements. It makes use of a script library for the needed constants. TIP: You can build your own charts with RMCdesigner, also available at www.rmchart.com. Use the program to generate source code for VB6 / ActiveX and paste it in an Lotus Notes button in a form. With very limited changes you can use that generated code in your application. If you have any questions regarding this application, mail me. Ferry Kranenburg

Original source : http://www.openntf.org/projects/codebin/codebin.ns…

Написано lotusnotes

Октябрь 29, 2008 в 9:12

Опубликовано в Lotus Notes

Visual Directory – thumbnails in the domino directory

без комментариев

Code to automatically display thumbnails in the domino directory using DXL and background agents The code is here => http://www.seancull.co.uk/Public/seancull.nsf/dx/visual-directory-thumbnails-in-the-domino-directory.htm

Original source : http://www.openntf.org/projects/codebin/codebin.ns…

Написано lotusnotes

Октябрь 29, 2008 в 9:12

Опубликовано в Lotus Notes

ExpandACL2Excel

без комментариев

When you check ACL of database, sometimes it is very hard to say which particular user has enough rights for example to delete documents in database or who has required role. This code will check each entry in ACL, then it will check if this is a group or user (using Domino Directory), and if this is a group expands all group members, then it will export result to Excel file, where you can use autofilter for easy records navigation

Original source : http://www.openntf.org/projects/codebin/codebin.ns…

Написано lotusnotes

Октябрь 29, 2008 в 9:12

Опубликовано в Lotus Notes

Disable and Cleanup Mail Rules

без комментариев

Add this agent to your Lotus Notes mail template. Ask your user to: – open their mailbox
- click on the Actions menu, and choose "Disable and Cleanup Mail Rules" This will disable all mail rules in the user’s mailbox, and move the user to their Rules folder so they can enable rules as needed.

Original source : http://www.openntf.org/projects/codebin/codebin.ns…

Написано lotusnotes

Октябрь 29, 2008 в 9:12

Опубликовано в Lotus Notes

Change fields position in a flat text file

без комментариев

‘—: Option Declare ‘ ‘ FieldName TAB Length TAB Position ‘ Const FormatFileInput=|
USR-IDAZE 8 36
USR-MAZEAT 7 44
USR-TIAZETRE 4 51
USR-NAZEOM 25 55 | ‘ ‘ FieldName TAB Length TAB Position ‘ Const FormatFileOutput=|
USR-IDAZE 8 501
USR-MAZEAT 7 509
USR-TIAZETRE 4 516
USR-NAZEOM 25 520 | Const FileNameInput = "IN.TXT"
Const FileNameOutput = "OUT.TXT" Type LineFileFormat
Name As String
Length As Long
Position As Long
End Type Type FormatConv
In As LineFileFormat
Out As LineFileFormat
End Type Dim LineOutTotalLength As Long Sub Initialize Dim FormatConvertion List As FormatConv
Dim V As Variant
Dim FormatFile_Tmp As Variant
Dim LineFileFormat_Tmp As LineFileFormat ‘ IN
FormatFile_Tmp = Split( FormatFileInput , Chr$(10) )
Forall Champ In FormatFile_Tmp
V = Split( Champ , Chr$( 9 ) )
If Trim$( V(0) ) <> "" Then
LineFileFormat_Tmp.Name = Trim$( V( 0 ) )
LineFileFormat_Tmp.Length = Val( V( 1 ) )
LineFileFormat_Tmp.Position = Val( V( 2 ) )
FormatConvertion( LineFileFormat_Tmp.Name ).IN = LineFileFormat_Tmp
End If
End Forall ‘ OUT
FormatFile_Tmp = Split( FormatFileOutput , Chr$(10) )
Forall Champ In FormatFile_Tmp
V = Split( Champ , Chr$( 9 ) )
If Trim$( V(0) ) <> "" Then
LineFileFormat_Tmp.Name = Trim$( V( 0 ) )
LineFileFormat_Tmp.Length = Val( V( 1 ) )
LineFileFormat_Tmp.Position = Val( V( 2 ) )
FormatConvertion( LineFileFormat_Tmp.Name ).OUT = LineFileFormat_Tmp
If LineFileFormat_Tmp.Position + LineFileFormat_Tmp.Length > LineOutTotalLength Then LineOutTotalLength = LineFileFormat_Tmp.Position + LineFileFormat_Tmp.Length
End If
End Forall ‘ ‘ Format Control ‘ Forall OneFieldConvertion In FormatConvertion
If OneFieldConvertion.In.Name = "" Then
Print OneFieldConvertion.Out.Name + Chr$(9) + Chr$(9) + " The ouput file do not contains this field"
Elseif OneFieldConvertion.Out.Name = "" Then
Print OneFieldConvertion.In.Name + Chr$(9) + Chr$(9) + " The ouput file do not contains this field"
Elseif OneFieldConvertion.In.Length > OneFieldConvertion.Out.Length Then
Print OneFieldConvertion.In.Name + Chr$(9) + Chr$(9) + " This field size will be reduced to " + Cstr(OneFieldConvertion.Out.Length) + " instead of " + Cstr(OneFieldConvertion.In.Length)
End If
End Forall ‘ ‘ Convertion ‘ Dim FileNumInPut As Long
FileNumInPut = Freefile
Open FileNameInput For Input Access Read As FileNumInPut Dim FileNumOutPut As Long
FileNumOutPut = Freefile
Open FileNameOutput For Output Access Write As FileNumOutPut Dim S As String
Do Until Eof(FileNumInPut)
Line Input #FileNumInPut, S
Print #FileNumOutPut, LineConvert( S , FormatConvertion )
Loop Close #FileNumOutPut
Close #FileNumInPut End Sub Function LineConvert( LineIn As String, FormatConvertion List As FormatConv ) As String Dim S As String Dim LineOut As String
LineOut = Space$( LineOutTotalLength ) Forall AFieldToConvert In FormatConvertion
If (AFieldToConvert.IN.Name <> "") And (AFieldToConvert.OUT.Name <> "") Then
S = Mid$( LineIn , AFieldToConvert.IN.Position , AFieldToConvert.IN.Length )
If Len(S) < AFieldToConvert.OUT.Length Then
S = S + Space$( AFieldToConvert.OUT.Length – Len(S) )
End If
LineOut = Left$( LineOut , AFieldToConvert.OUT.Position-1 ) + Left$( S , AFieldToConvert.OUT.Length ) + Mid$( LineOut , AFieldToConvert.OUT.Position + AFieldToConvert.OUT.Length )
End If
End Forall LineConvert = LineOut End Function

Original source : http://www.openntf.org/projects/codebin/codebin.ns…

Написано lotusnotes

Октябрь 29, 2008 в 9:12

Опубликовано в Lotus Notes

Export all group members in CSV file

без комментариев

Dim FileNum As Long
Dim LogError As String Sub Initialize Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments Set doc = collection.GetFirstDocument()
While Not(doc Is Nothing) Call InitExport( Doc.ListName(0) )
Call GroupExport( Doc.ListName(0) )
Call TerminateExport( ) Set doc = collection.GetNextDocument(doc)
Wend
print LogError
End Sub Sub TerminateExport( ) Close #FileNum End Sub Sub GroupExport( GroupName As String ) Dim Session As New NotesSession
Dim DB As NotesDatabase
Set DB = Session.CurrentDatabase Dim AllUsersView As NotesView
Set AllUsersView = DB.GetView( "($Users)" ) Dim Doc As NotesDocument
Set Doc = AllUsersView.GetDocumentByKey( GroupName , True ) If Doc Is Nothing Then
LogError = LogError + " Groupe/User introuvable : " + GroupName + Chr$(10)
Exit Sub
End If If Doc.Type(0) = "Group" Then Forall OneMember In Doc.Members
GroupExport( OneMember )
End Forall Elseif Doc.Type(0) = "Person" Then Print #FileNum, |"| + Doc.FullName(0) + |"| End If End Sub Sub InitExport( GroupName As String ) FileNum = Freefile() Open "c:\TEMP\Export CSV of " + GroupName + ".CSV" For Output Access Write As FileNum End Sub

Original source : http://www.openntf.org/projects/codebin/codebin.ns…

Написано lotusnotes

Октябрь 29, 2008 в 9:12

Опубликовано в Lotus Notes