Error when Load Report from Assemblly

Stimulsoft Reports.NET discussion
Post Reply
duyhungb5
Posts: 1
Joined: Wed Jan 14, 2009 2:26 am

Error when Load Report from Assemblly

Post by duyhungb5 »

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
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Error when Load Report from Assemblly

Post by Edward »

Hi,

Please check that report's assemblies you tried to load have been built with the same version of the report engine. It is impossible to load report's dlls created in other version of the report engine.

Versions of the report engine and dlls in StiReport.GetReportFromAssembly() must always match.

Thank you.
Post Reply