H
Hexman
Hello All,
I have a new challenge. I've created a Crystal Report (version 10) and saved the file. Now from my program I want to print it to an Adobe PDF file.
My question is: How do I pass parameters thru Crystal to modify printer behavior?
For Instance:
1. Pass it a path & filename to save to. eg; "C:\ReportDist\R100102-060902.pdf" (included the date in the filename)
2. Tell the Adobe PDF printer to overwrite an existing file if present.
Other things like 1 & 2 above.
I'm using Adobe Acrobat v7.0 Pro. I do not have their SDK. I only want the the larger reports to go to PDF. The others I will be printing to their
local printer. Any other way to accomplish the same?
Thanks,
Hexman
My code is pretty straight forward.
private sub PrintReport102()
Dim reportPath As String = "C:\ReportDefs\"
Dim reportName As String = "R100102.rpt"
Dim myReportDocument As ReportDocument = New ReportDocument()
myReportDocument.Load(reportPath & reportName)
myReportDocument.SetParameterValue("SelectedDate", "09/02/2006")
myReportDocument.PrintOptions.PrinterName = "Adobe PDF"
myReportDocument.PrintToPrinter(1, True, 1, 999)
end sub
I have a new challenge. I've created a Crystal Report (version 10) and saved the file. Now from my program I want to print it to an Adobe PDF file.
My question is: How do I pass parameters thru Crystal to modify printer behavior?
For Instance:
1. Pass it a path & filename to save to. eg; "C:\ReportDist\R100102-060902.pdf" (included the date in the filename)
2. Tell the Adobe PDF printer to overwrite an existing file if present.
Other things like 1 & 2 above.
I'm using Adobe Acrobat v7.0 Pro. I do not have their SDK. I only want the the larger reports to go to PDF. The others I will be printing to their
local printer. Any other way to accomplish the same?
Thanks,
Hexman
My code is pretty straight forward.
private sub PrintReport102()
Dim reportPath As String = "C:\ReportDefs\"
Dim reportName As String = "R100102.rpt"
Dim myReportDocument As ReportDocument = New ReportDocument()
myReportDocument.Load(reportPath & reportName)
myReportDocument.SetParameterValue("SelectedDate", "09/02/2006")
myReportDocument.PrintOptions.PrinterName = "Adobe PDF"
myReportDocument.PrintToPrinter(1, True, 1, 999)
end sub