Urgent:Crystal not showing data at second page( Nagvigation button)

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?

BTW, I display data in 2 rows(for each record)  in detail section of CR.

Thanks in advance.  
mrongAsked:
Who is Participating?
 
NetminderConnect With a Mentor Commented:
Closed, 200 points refunded.
Netminder
Site Admin
0
 
mrongAuthor Commented:
The number of total pages is 25, but I can only see the first page of report.
0
 
mlmccCommented:
Are you clicking the WEB Page NEXT or the Crystal NEXT Arrow?

mlmcc
0
 
mrongAuthor Commented:
Crystal Report NEXT.

Thanks.
0
 
mrongAuthor Commented:
I figured it out.
The 'CrystalReportViewer1.ReportSource=?' need to be put outside of Page_Load function.
 
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.