• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 195
  • Last Modified:

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.  
0
mrong
Asked:
mrong
  • 3
1 Solution
 
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
 
NetminderCommented:
Closed, 200 points refunded.
Netminder
Site Admin
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now