Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXPORT TO A FILE WITH CRVIEWER and VB

Status
Not open for further replies.

SimonQC

Programmer
Aug 28, 2001
1
CA
Hello!!!
I'm using visual basic and the crviewer. I want to know if theres a way to preview a report in the crviewer and after export the report in a file (pdf or rpt..) But i dont want to use the crystalReport.export because i will read the source again!!! (my report is very big it's take about 1.1/2 min to show)

this is my code
'***
' in a screen i have but the crviewer object and on button
'***
Code:
private report as craxdrt.report
private app as craxdrt.application
'
private sub form_load()

set report = crxapplication.openreport("C:\test1.rpt")

crviewer1.reportsource = report
crviewer1.viewreport

end sub
'
private sub CommandExport_click()
'it's working but it's very long
'because i read the source again
dim crExpOption a craxdrt.exportoptions

set crExpOption = report.exportoptions
crExpOption.formattype = creftrichtext
crExpOption.destinationtype = credtdiskfile
crExpOption.diskfilename = "C:\testout1.rtf"
'and export the report without prompting user
report.export false

end sub

Tanks, merci!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top