|
Hi all,
I have a problem that when I use DrawImage(), I got "System.NullReferenceExpection" below is the code:
Private Sub Test_ReportStart(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.ReportStart Dim fs As FileStream Dim x As Single = 1.1F Dim y As Single = 1.1F Dim width As Single = 1.1F Dim height As Single = 1.1F Dim drawRect As New RectangleF(x, y, width, height) fs = New FileStream(HttpContext.Current.Server.MapPath("../Images/test.PNG"), FileMode.Open, FileAccess.Read) Me.CurrentPage.DrawImage(System.Drawing.Image.FromStream(fs), drawRect) fs.Close()
End Sub
at Testrpx.Test_ReportStart(Object sender, EventArgs e) in C:\Inetpub\wwwroot\Reports\Testrpx.vb:line 146 at DataDynamics.ActiveReports.ActiveReport.-b01() at DataDynamics.ActiveReports.ActiveReport.-fa2(Boolean bDelayedInit) at DataDynamics.ActiveReports.ActiveReport.Run(Boolean syncDocument) at TCM.RpxReportGenerator.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\Report\RpxReportGenerator.aspx.vb:line 89
Please help!
|