Error when Load Report from Assemblly
Posted: Wed Jan 14, 2009 2:30 am
I use Stimulsoft Reports.Net but when I load Report form Assemblly ( file with exten .dll) then -> error:
Value cannot null
Parameter name: path1
code:
Dim report As StiReport
Dim compiledReportFile As String = Application.StartupPath & "\" & "SoCaiTaiKhoan.dll"
If System.IO.File.Exists(compiledReportFile) Then ' Error
report = StiReport.GetReportFromAssembly(compiledReportFile, True)
report.RegData("dsReport", DataSet2.Tables(0))
'report.CompiledReport.Dictionary.Clear()
report("TaiKhoan") = "111"
report("DoiTuong") = 0
report.Render(False)
report.Show()
Else 'No Error
report = New StiReport
report.Load("..\SoCaiTaiKhoan.mrt")
report.RegData("dsReport", DataSet2.Tables(0))
report.Compile(compiledReportFile)
report("TaiKhoan") = "111"
report("DoiTuong") = 0
report.Render()
report.Show()
End If
Help Me
Value cannot null
Parameter name: path1
code:
Dim report As StiReport
Dim compiledReportFile As String = Application.StartupPath & "\" & "SoCaiTaiKhoan.dll"
If System.IO.File.Exists(compiledReportFile) Then ' Error
report = StiReport.GetReportFromAssembly(compiledReportFile, True)
report.RegData("dsReport", DataSet2.Tables(0))
'report.CompiledReport.Dictionary.Clear()
report("TaiKhoan") = "111"
report("DoiTuong") = 0
report.Render(False)
report.Show()
Else 'No Error
report = New StiReport
report.Load("..\SoCaiTaiKhoan.mrt")
report.RegData("dsReport", DataSet2.Tables(0))
report.Compile(compiledReportFile)
report("TaiKhoan") = "111"
report("DoiTuong") = 0
report.Render()
report.Show()
End If
Help Me