Crystal Reports Automation
How do i use the crystal reports add-ins for visual basic? i basically want a report to run from a vb app (not using the viewer) and export that report direclty to a file (adobe pdf). I've read thru some of the help files that come with crystal reports, but i'm still lost.
Any advice?
~goddess
[email protected]
Re: Crystal Reports Automation
hi
you can select export formate form the available list of PrintFileType property,
and assign PrintFileName property to export file name,
then assign destination property to rptfile
This will directly export to file without preview.
Babu.
MailID: [email protected]
Re: Crystal Reports Automation
Do you have a code sample of how to do this? I need to see how it is done from start to finish (like creating the cyrstal report object, etc.)
Thanks!
~goddess
[email protected]
Re: Crystal Reports Automation
Hi,
I am also looking out for some sample program, incase you found some thing can u tell me about it.
Regards,
kiran.
Re: Crystal Reports Automation
'Here you have to check out for the formattype, then set it to PDF file.
Private Sub command1_Click()
Dim Report as New CrystalREport1
Report.ExportOptions.FormatType = crEFTText
Report.ExportOptions.DestinationType=crEDTDiskFile
Report.ExportOptions.DiskFileName = "FileName"
Report.Export False
End Sub
Re: Crystal Reports Automation
Here some additional stuff:
' Set the reportname
CrystalReport1.ReportFileName = strReportname
' To send an (additional) selection
CrystalReport1.ReplaceSelectionFormula (strSelect)
' To print the report
' First you have to define the way of printing
' (to a file, to screen or to the printer)
CrystalReport1.PrintReport
If you have the Crystal component you can use the object browser to view the properties and methods. Good luck.