Kaskus

Tech

cyberservoAvatar border
TS
cyberservo
ASP.NET : Crystal Report error pada saat ngeprint. HELP
Dear agan-agan kaskus yg ganteng baik hati dan ngga pelit ilmu..
ane ada masalah pada saat print report di asp.net menggunakan cristal report gan.

ini dia contoh report nya gan.:
Spoiler for check image below ::


nah pada saat tombol print di click ini dia error nya gan :

Spoiler for check image below ::


nah ini kodingan ane gan..
Code:

Sub BindReport()
Dim cmd As New SqlCommand
Dim ConnInfo As New ConnectionInfo
Dim dtpashing As Date = Session("phasing_tgl_valuta")
Dim rd As SqlDataReader

If Len(Trim(Session("phasing_tgl_valuta"))) > 0 Then
Me.CrystalReportViewer1.ReportSource = Server.MapPath("Report\R_faktur.rpt")

Call koneksi()

cmd = New SqlCommand("Select * from tbl_faktur where tglvaluta='" & Strings.Format(dtpashing, "yyyy-MM-dd") & "'", con)

Dim ds As New DataSet()
Dim da As SqlDataAdapter = New SqlDataAdapter(cmd)

da.Fill(ds)
Dim oRpt As ReportDocument = New ReportDocument()
oRpt.Load(Server.MapPath("~\Report\R_faktur.rpt"), OpenReportMethod.OpenReportByDefault)
'oRpt.Load(Server.MapPath("~\Report\R_faktur.rpt"), OpenReportMethod.OpenReportByTempCopy)
oRpt.SetDatabaseLogon("sa", "qazwsx", "svrsql2", "db_permata")
oRpt.PrintOptions.PaperOrientation = PaperOrientation.Landscape
oRpt.SetDataSource(ds.Tables(0))
CrystalReportViewer1.ReportSource = oRpt
CrystalReportViewer1.PrintMode = CrystalDecisions.Web.PrintMode.Pdf

End If
End Sub



Please bantuanya nya gan..emoticon-Berduka (S)emoticon-Berduka (S) emoticon-Berduka (S)
0
855
4
GuestAvatar border
Komentar yang asik ya
Urutan
Terbaru
Terlama
GuestAvatar border
Komentar yang asik ya
Komunitas Pilihan