0
我有水晶報告!對,我要打印水晶報表我的代碼是文本框輸入的值,如何使用vb.net打印水晶報表標題部分的文本框值?
Dim report As New CrystalDecisions.CrystalReports.Engine.ReportDocument
Dim xs As String
xs = salfdte2.Text
Dim cmd1 As OleDbCommand = New OleDbCommand("SELECT * from product",con)
myDA = New OleDbDataAdapter(cmd1)
myDataSet = New DataSet()
myDA.Fill(myDataSet, "product")
report.Load(Application.StartupPath & "\saledtewserpt.rpt")
report.SetParameterValue("fdte", xs)
'the above line is my pproblem
report.SetDataSource(myDataSet.Tables("outwardp"))
saledtereport.CrystalReportViewer1.ReportSource = report
saledtereport.ShowDialog()
它工作得很好,但在運行時的報告要求我爲fdte參數輸入參數值!我不想要這個提示!如何解決這個問題呢?在此先感謝開發人員。
謝謝你這麼多您的寶貴回覆先生!第二個方法很好用,先生! – Rkmunusamy
也在那裏,我發現這個問題的另一個資源! http://www.codeproject.com/Questions/454333/passing-parameters-to-crystal-report-through-vb-ne – Rkmunusamy