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
Solved

export to pdf using vb and crystal reports

Posted on 2008-10-14
5
459 Views
Last Modified: 2013-12-26
I want to connect to an oracle db and create a report for each record in the table and export it to a pdf file giving it a new file  name. This report has many sub reports (11). I want to use vb 6 and I have 85, 9, 10 and XI versions of Crystal reports
0
Comment
Question by:Bosco2006
  • 2
5 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 125 total points
ID: 22716879
I would look into a 3rd-party tool like

Visual Cut
http://www.milletsoftware.com/Visual_CUT.htm

You can build your own application


Here is the basic code for CR8 using the RDC.  It shpould be close for the versiions you have.
Option Explicit
    Private crApp As CRAXDRT.Application
    Private crRpt As CRAXDRT.Report

'
'   Check if report is already in use
'
    If IsObject(crRpt) Then
       Set crRpt = Nothing
    End If

'
'   Open report
'
    Set crApp = New CRAXDRT.Application

    Set crRpt = crApp.OpenReport("C:\Crystal\MyRepots\My_Report.rpt",1)


'
'   Set Crystal flags
'
    crRpt.EnableParameterPrompting = False
    crRpt.DiscardSavedData

'
'   Set export options
'
    crRpt.ExportOptions.DestinationType = crEDTEMailMAPI
    crRpt.ExportOptions.MailToList = "SomeBody@SomeISP"
    crRpt.ExportOptions.MailSubject = "Todays Crystal Report"
    crRpt.ExportOptions.MailMessage = "Here is the newest report"
    crRpt.ExportOptions.FormatType = crEFTPortableDocFormat

    crRpt.Export False
   
mlmcc
0
 

Author Comment

by:Bosco2006
ID: 22944063
Thanks for the response but I conerted the report to Crystal XI and used C# to export to pdf.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 22951510
The code suggested would solve the initial question.

mlmcc
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
vb6 connector to mongodb 2 117
VB6 - Convert HH:MM into Decimal 8 62
Selection between two dates and time range. 21 40
IF ELSE Statement in Excel Macro VBA 16 75
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
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…
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…

839 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