Greetings,

I use CR viewer to show the web report. I have 2 pages, say 1.aspx & 2.aspx. 1.aspx ask the user to pick up the field name then call 2.aspx, 2.aspx pass the parameter and run a sorting then return the report on CR viewer. I only get the report for 1st page. If I click on the 'next' navigation button, I got the following error message:

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 30: Dim crReport As New CrystalReport3()
Line 31:
error here-> Line 32: pdrnum.Text = Request.Form("pdr").ToString()
Line 33: ' yrnum.Text = Request.Form("yr").ToString()
Line 34: ' campname.Text = Request.Form("campus").ToString()

Above code is from Page_Load function. It seems like the page get refresh when I click on 'next' navigation button, and lost the value for Request.Form("pdr").ToString(). How to fix it?


Thanks in advance.