Home > Archive > Visual Basic Crystal Reports > January 2006 > export report to pdf using 8.5
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
export report to pdf using 8.5
|
|
| Abraham Andres Luna 2006-01-17, 7:07 pm |
| hello everyone,
there are no resources to help me so i'm asking on this forum.
i have crystal reports 8.5 developer edition
i have visual c# express and .net 2 final release
i started a new windows application and i need help programming with the
crystal reports. there examples are for earlier versions of visual
studio and there are no explanations for anything. all i want to do is
export the report to a pdf and then manipulate the pdf file. does anyone
know of any resources or tutorials that can help.
everything i have found is for newer versions of crystal.
| |
| Shariq 2006-01-17, 7:07 pm |
| I have VB.Net code to export a Crystal Report 8.5 to PDF; let me know if this
is what you would like to have.
"Abraham Andres Luna" wrote:
> hello everyone,
>
> there are no resources to help me so i'm asking on this forum.
> i have crystal reports 8.5 developer edition
> i have visual c# express and .net 2 final release
> i started a new windows application and i need help programming with the
> crystal reports. there examples are for earlier versions of visual
> studio and there are no explanations for anything. all i want to do is
> export the report to a pdf and then manipulate the pdf file. does anyone
> know of any resources or tutorials that can help.
>
> everything i have found is for newer versions of crystal.
>
| |
| Abraham Andres Luna 2006-01-17, 7:07 pm |
| yes please, i would like that code
i should be able to convert it to c# easily
do you mind also posting where you found the code, or maybe what did you
read to help you write the code.
| |
| Shariq 2006-01-18, 7:07 pm |
| I think I found a TK article on BO site. Here is the code:
Private Sub ExportReport()
Dim crReportDocument As ReportDocument
Dim crExportOptions As ExportOptions
Dim crDiskFileDestinationOptions As New DiskFileDestinationOptions
Dim Fname As String
Dim InputFileName As String = "SNReport.rpt"
Dim InputPath As String = gsExportPath & "\Reports\"
Dim OutputPath As String = gsExportPath & "\Output\"
Dim InputFilePath As String = InputPath & InputFileName
Try
crReportDocument = New ReportDocument
crReportDocument.Load(InputFilePath)
Fname = OutputPath & gsJobNumber & "_" & Format(Today.Month,
"00") & Format(Today.Day, "00") & Today.Year & ".pdf"
gsImportFilename = InputFilePath
Dim pv_Date As New CrystalDecisions.Shared.ParameterValues
Dim pdv_DateRange As New
CrystalDecisions.Shared.ParameterDiscreteValue
pdv_DateRange.Value = gsProductNumber
pv_Date.Add(pdv_DateRange)
crReportDocument.DataDefinition.ParameterFields("Product").ApplyCurrentValues(pv_Date)
Dim diskFile_Report As New
CrystalDecisions.Shared.DiskFileDestinationOptions
diskFile_Report.DiskFileName = Fname
crReportDocument.ExportOptions.ExportFormatType =
CrystalDecisions.Shared.ExportFormatType.PortableDocFormat
crReportDocument.ExportOptions.ExportDestinationType =
CrystalDecisions.Shared.ExportDestinationType.DiskFile
crReportDocument.ExportOptions.DestinationOptions =
diskFile_Report
crReportDocument.Export()
Catch ex As Exception
MsgBox(Err.Description, MsgBoxStyle.Information, "ExportReport")
End Try
End Sub
"Abraham Andres Luna" wrote:
> yes please, i would like that code
> i should be able to convert it to c# easily
> do you mind also posting where you found the code, or maybe what did you
> read to help you write the code.
>
>
>
| |
| Abraham Andres Luna 2006-01-20, 7:59 am |
| ty for your answer, i will be testing the code.
|
|
|
|
|