?
Solved

Export A Crystal Report to report.html

Posted on 2003-03-23
4
Medium Priority
?
457 Views
Last Modified: 2012-05-04
Hi there friends,
Please help me with this if posible

Using:Crystal rep 8.5
VB6 SP5

I have a application that usses a Crystal report called (sales.rpt)
I need to have a sample or coding how to export this when i click the button to a report.html.

Private Sub Command1_Click()
 --->>>> I need the coding here plz.....
end sub

thanks to all
0
Comment
Question by:pvisser1
[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
  • 2
4 Comments
 
LVL 18

Expert Comment

by:Sethi
ID: 8192308
Design a report and save it in .rpt format.

In you VB code write the following:

Dim rptApplication As CRAXDRT.Application
Dim WithEvents rptReport As CRAXDRT.Report

With rptReport
  .ExportOptions.DestinationType = crEDTDiskFile
  .ExportOptions.HTMLFileName = strPathAndReportName & ".html"
  .ExportOptions.FormatType = crEFTHTML40
  .Export (False)
End With
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 240 total points
ID: 8192457
That is part of the answer.  You need to create the CR application and the report instance first

Dim rptApplication As CRAXDRT.Application
Dim WithEvents rptReport As CRAXDRT.Report

Private Sub Command1_Click()

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

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

    Set rptReport = rptApplication.OpenReport(FullPathandFileName.rpt, 1)

    With rptReport
      .ExportOptions.DestinationType = crEDTDiskFile
      .ExportOptions.HTMLFileName = strPathAndReportName & ".html"
      .ExportOptions.FormatType = crEFTHTML40
      .Export (False)
End With

end

mlmcc
0
 

Author Comment

by:pvisser1
ID: 8194062
Thanks 2 all.

mlmcc the answer you give me did  what i need.
Also a want to thank the other guys how helped me out..

Thanks...
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 8194783
Glad I could help

mlmcc
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Suggested Courses
Course of the Month13 days, 4 hours left to enroll

777 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