我想在htm中向rpt pdf报告显示文本,但我的视图状态未在rpt中显示文本。您可以在下面看到我当前的方法。我会
ViewState("KOMBO") = tipe
Dim filename As String = ""
If tipe = "D" Then
filename = Server.MapPath("text\establisher.htm")
namatipe = "ESTABLISHER"
ElseIf tipe = "DI" Then
If isDIequal Then
filename = Server.MapPath("text\influencer.htm")
namatipe = "INFLUENCER"
Else
filename = Server.MapPath("text\concluder.htm")
namatipe = "CONCLUDER"
End If
Dim crystalReport As New ReportDocument()
Dim guid As Guid = System.Guid.NewGuid
Dim nama As String
crystalReport.Load(Server.MapPath("~/Hasil2.rpt"))
crystalReport.SetParameterValue("nama", lblNama.Text)
crystalReport.SetParameterValue("ttl", lblLahir.Text)
crystalReport.SetParameterValue("tipe", lblTipe.Text)
crystalReport.SetParameterValue("KOMBO", ViewState("KOMBO"))
crystalReport.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Request.PhysicalApplicationPath & "WebForm/temps2/" & "DISC" & guid.ToString & ".pdf")
Response.Write("<script>window.open('temps2/" & "DISC" & guid.ToString & ".pdf')</script>")
crystalReport.Close()
crystalReport.Dispose()