• Why hard code?

    By Stepan Karandin 2 decades ago

    Good stuff but I saw thru the code. I wonder why don't you use DXL and XSLT transformation?

    It's easy to make any kind of HTML reports by XML export and transformation.

    Like this one:



    Sub Initialize

    Dim ws As New NotesUIWorkspace<br/>
    Dim s As New NotesSession<br/>
    Dim db As NotesDatabase<br/>
    Set db = ChooseDatabase<br/>
    If db Is Nothing Then Exit Sub<br/>
    Dim nc As notesNoteCollection<br/>
    Set nc = getNotes(db)<br/>
    <br/>
    Dim choice As Variant<br/>
    choice = ws.OpenFileDialog(False,&quot;Файл, куда писать данные&quot;)<br/>
    If Not Isarray(choice) Then Exit Sub<br/>
    Dim filename As String<br/>
    filename = choice(0)<br/>
    <br/>
    Dim streamMain As NotesStream<br/>
    Set streamMain = s.CreateStream<br/>
    If Not streamMain.Open(filename) Then<br/>
        Msgbox &quot;Невозможно открыть файл&quot;<br/>
        Exit Sub<br/>
    End If<br/>
    streamMain.Truncate<br/>
    Dim DEX As NotesDXLExporter <br/>
    Set DEX = s.CreateDXLExporter(nc)<br/>
    DEX.ExitOnFirstFatalError = True<br/>
    DEX.OutputDOCTYPE = False<br/>
    DEX.SetOutput streammain<br/>
    DEX.Process <br/>
    

    End Sub


    • To allow database to be used by R5 clients...

      By Cesar Mugnatto 2 decades ago

      NotesStream class and NotesDXLExporter are not available on R5.

      • Sure

        By Stepan Karandin 2 decades ago

        I don't believe a lot of colleagues have R5 only…This tool is useful for SA/AD not ordinary user.

        In case usage in R6 only we can build only wraper functionality and a lot of XSLT for any kind of report.

        Like Forms and fields, Design inheritance, etc.