Vb.net Crystal Report Export to .PDF
Posted on 2008-10-09
I currently have a block of code below that I created to load a crystal report into a local viewer and pass the required parameters to the crystal report to display the parameters. I was wondering of a way to not load the report into the viewer and automatically export it to a .pdf document. I still need to pass the parameters to the document also. Any help would be greatly appreciated.
Crystal report load:
'Declare new variable to instance of the specified crystal report.
Me.CrystalReportViewer1.ReportSource = "C:\FrozenDessertVB\fdinspectionreport.rpt"
Dim ParamFields As ParameterFields = Me.CrystalReportViewer1.ParameterFieldInfo
Dim p_inspection As New ParameterField
p_inspection.Name = "Inspection"
Dim p_inspection_Value As New ParameterDiscreteValue
p_inspection_Value.Value = My.Settings.Inspection_Identity