Estuardo,
I tried using your code and still got the same error message. Below is my exact code.
Code:Public Function CreateSettlementReport() As Exception Try Dim crSettlement As New rptSettlement Dim diskOpts As DiskFileDestinationOptions = ExportOptions.CreateDiskFileDestinationOptions() Dim exportOpts As ExportOptions = New ExportOptions() strSettlementReport = "\Settlement" & strReportDate & ".PDF" exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat exportOpts.ExportDestinationType = ExportDestinationType.DiskFile diskOpts.DiskFileName = strPath & strSettlementReport exportOpts.ExportDestinationOptions = diskOpts With crSettlement .Load(strSettlementReport) .SetDataSource(DS) .SetParameterValue("@ReportType", strReportType) .Export(exportOpts) End With crSettlement = Nothing Return Nothing Catch ex As Exception strProcedure = "CreateSettlementReport()" strMsg = ex.Message WriteToErrorFile(strMsg, strProcedure, strProgram, intRecordCount) Return ex End Try End Function




Reply With Quote