|
-
Oct 29th, 2002, 10:37 AM
#1
Thread Starter
Hyperactive Member
generate report, save pdf without user intervention or viewing
I currently have a Crystal Report 8.5 using the Dev edition inside my VB6 application that I use a form with the crviewer to run, there are a few paramaters I pass with code.
My boss as an additional request now wants to generate the report,save as pdf, and mail it using MAPI along with other attachments without the user ever seeing the actual report in the viewer. I can handle the other attachments I just don't know how to generate the Crystal Report input the paramaters save etc without the user seeing it and without any user intervention.
Any suggestions as to how to do this would be appreciated.
Thanks
-
Oct 31st, 2002, 09:13 AM
#2
Hyperactive Member
I to am intersted in finding this out.....
If i figure it out I'll let you know, and please do the same if you find out how.
thanks
-
Oct 31st, 2002, 09:37 AM
#3
Thread Starter
Hyperactive Member
I will be glad to share the answer with you if I can ever get this figured out.
-
Oct 31st, 2002, 10:00 AM
#4
Hyperactive Member
Figured it out
you need to add the Crystal Reports 8.5 ActiveX Designer Run Time Library
[Highlight=VB]
Private Sub Command1_Click()
Dim appl As New CRAXDRT.Application
Dim rep As CRAXDRT.Report
Set rep = appl.OpenReport("c:\temp\Promising Prospects Summary (NS).rpt", 1)
rep.ExportOptions.DiskFileName = "c:\temp\pdf_report.pdf"
rep.ExportOptions.DestinationType = crEDTDiskFile
rep.ExportOptions.FormatType = crEFTPortableDocFormat
rep.Export False
End Sub
[\vbcode]
-
Oct 31st, 2002, 10:08 AM
#5
Thread Starter
Hyperactive Member
Thanks scostell
I will give that a try, looks like it should work fine. 
Thanks again
-
Dec 6th, 2005, 01:50 PM
#6
New Member
Re: generate report, save pdf without user intervention or viewing
scostell,
Thank you very much....I was looking for code to save a crystal report to pdf and you saved me a ton of time.
-
Jul 31st, 2012, 05:13 AM
#7
Addicted Member
Re: generate report, save pdf without user intervention or viewing
Hello scostell , I was searching the forum for Generating PDF files from VB without user intervention and found this thread. Your code helped me and I was able to generate report in PDF. Thank a lot. I am facing two small problems... a. If my database (*.mdb) is password protected then it is not working and giving me and error "Server has not opened." b. If on report I have any formula field, then how to set the values of this field. Thanks,
-
Jul 31st, 2012, 12:27 PM
#8
Re: generate report, save pdf without user intervention or viewing
You could use the ConnectionProperties object to pass the password to the rpt when you load it in the vb6 app
I can help you more if you post the Datasource properties of the rpt
In the Crystal reports ide, menu / Database / Set Datasource Location
Expand the Properties level and post them
Also post your actual code where you load & export the rpt
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|