hola , aver si alguien sabe como ayudarme-
tengo una reporte que lee datos de una base en oracle, me funciona bien , pero no tengo idea como hacer funcionar una con parametros, es decir necesito algo parcecido a lo qu etengo preo el report qeu estoy llamando tiene dos parametros definidos.
Dim myExportOptions As CrystalDecisions.Shared.ExportOptions
Dim myDiskFileDestinationOptions As CrystalDecisions.Shared.DiskFileDestinationOptions
Dim myExportFile As String
Dim myReport As New ReportDocument
Dim codigo As String
Dim estado As String
myReport.Load("C:\Proyecto IPR\agentes.rpt")
myExportFile = "C:\TEMP\PDF " & Session.SessionID.ToString & ".pdf"
Dim myDBConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo
With myDBConnectionInfo
.ServerName = "orcl1"
.DatabaseName = "orcl1"
.UserID = "nnnn"
.Password = "nnnnn"
End With
myDiskFileDestinationOptions = New CrystalDecisions.Shared.DiskFileDestinationOptions
myDiskFileDestinationOptions.DiskFileName = myExportFile
myExportOptions = myReport.ExportOptions
With myExportOptions
'.DestinationOptions = myDiskFileDestinationOptions
'.ExportDestinationType = ExportDestinationType.DiskFile
'.ExportFormatType = ExportFormatType.PortableDocFormat
.DestinationOptions = myDiskFileDestinationOptions
.ExportDestinationType = CrystalDecisions.[Shared].ExportDestinationType.DiskFile
.ExportFormatType = CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat
End With
myReport.Export()
'myReport.RecordSelectionFormula = "{Vw_PatLog.PatAccount} = 'XXXXXXXXXXXX'"
myReport.Refresh()
Dim myTableLogonInfo As New CrystalDecisions.Shared.TableLogOnInfo
Dim myDatabase = myReport.Database
Dim myTables = myDatabase.Tables
Dim myTable As CrystalDecisions.CrystalReports.Engine.Table
For Each myTable In myTables
myTableLogonInfo = myTable.LogOnInfo
myTableLogonInfo.ConnectionInfo = myDBConnectionInfo
myTable.ApplyLogOnInfo(myTableLogonInfo)
Next
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.WriteFile(myExportFile)
Response.Flush()
Response.Close()
System.IO.File.Delete(myExportFile)