?
Solved

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

Posted on 2001-07-20
1
Medium Priority
?
435 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 400 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

765 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