Dim PathFile As String = "c:\Documents" & "\Reporte.pdf"
formatType = ExportFormatType.PortableDocFormat
Dim oConexInfo As New CrystalDecisions.Shared.TableLogOnInfo
oConexInfo.ConnectionInfo.ServerName = "SERVER"
oConexInfo.ConnectionInfo.DatabaseName = "DBNAME"
oConexInfo.ConnectionInfo.UserID = "USERID"
oConexInfo.ConnectionInfo.Password = "PASSWORD"
rpt.Load(Server.MapPath("~/Imprime.rpt"))
rpt.SetParameterValue(0, Val(txt_No_Quotation.Text)) ' I send a parameter value
rpt.Database.Tables(0).ApplyLogOnInfo(oConexInfo) ' Here I send the credentials for conection to SQL Server with crystal reports
CrystalReportViewer1.ReportSource = rpt
ConfigureCRTSTALREPORT()
rpt.ExportToDisk(formatType, PathFile) ' Here I export the pdf to disk (in server side)
1条答案
按热度按时间qij5mzcb1#
我解决了问题。
这是密码,因为如果你需要它。
问候。
字符串