Solved

VB code for Exprorting a Crystal report to Lotus Notes Data Base

Posted on 2001-07-20
1
431 Views
Last Modified: 2007-11-27
I am trying to export a crystal report to Lotus Notes data
base using API calls. And I am getting a 541 error.
I am Using this code.
I added crwrap32.dll,global32.dll to my project.
rc = PEOpenEngine()
If rc <> 1 Then
     rc = PEGetErrorCode(0)
     MsgBox rc
    End If
    ReportPath = "reportpath"
    pj = PEOpenPrintJob(ReportPath & "ReportName.rpt")
    If pj <> 1 Then
         pj = PEGetErrorCode(pj)
         MsgBox pj
    End If
    '********Export to notes data base
    myDatabse = "\\Server\database.nsf"
    myForm = "Report Form"
    myComments = "test"
    myDLL = "U2FRTF.DLL"
    myformatType = crUXFRichTextFormatType
    UseSameNumberFormat = 0
    UseSameDateFormat = 0
    StringDelimiter = ""
    FieldDelimiter = ""
rc = PELogOnServer("P2sodbc.dll", LogOnInfo)
    rc = PEGetErrorCode(rc)
    rc = crPEExportToNotes(pj, myDatabse, myForm, myComments, myDLL, myformatType, _
            UseSameNumberFormat, UseSameDateFormat, StringDelimiter, FieldDelimiter)
    If rc <> 1 Then
         rc = PEGetErrorCode(pj)
         MsgBox rc
    Else
         rc = PEStartPrintJob(pj, True)
         If rc <> 1 Then
             rc = PEGetErrorCode(pj)
             MsgBox rc
        Else
             MsgBox " Exporting is done "
         End If
    End If
    PEClosePrintJob (pj)
    PECloseEngine
Can any body tell me where I am Going wrong.
Thanks
0
Comment
Question by:Regulapati
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 12

Accepted Solution

by:
DRRYAN3 earned 200 total points
ID: 6304047
What version of CRW are you using, 8.5?  At what point in your code are you getting the 541 error (Error In Export DLL)?  

Try using the crPEExportOptions and crPEExportTo instead of the crPEExportToNotes call.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA to copy paste columns form one file to other 20 100
A macro to Count the number of rows across all worksheets 3 151
Hide vba in gp 7 116
Export Data to Different .csv Files 26 121
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question