Solved

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

Posted on 2001-07-20
1
430 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
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

809 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