I'm using Crystal Reports with .Net. In my Page_Load event, my code goes to the database gets the data for the report in the form of a dataset, sets the reporSource and then binds
Dim cr As payCoverageCry = New payCoverageCry()
cr.SetDataSource(ds)
CryRptPayCoverage.ReportSource = cr
CryRptPayCoverage.DataBind()
The report comes out fine. Each time I select a new page in the report, my Page_Load event fires off and the call to the DB is done ect.. I tried using a If not page.IsPostback with the thinking that the report has all it's data, therefore I need only get the data once. When I did that and I navigated to the second page, it just showed the CrystalReport VIewer object on the web page. So I'm thinking I'm not placing my code to bind the report in the right place. Or is this how it's suppose to work?
Dim cr As payCoverageCry = New payCoverageCry()
cr.SetDataSource(ds)
CryRptPayCoverage.ReportSource = cr
CryRptPayCoverage.DataBind()
The report comes out fine. Each time I select a new page in the report, my Page_Load event fires off and the call to the DB is done ect.. I tried using a If not page.IsPostback with the thinking that the report has all it's data, therefore I need only get the data once. When I did that and I navigated to the second page, it just showed the CrystalReport VIewer object on the web page. So I'm thinking I'm not placing my code to bind the report in the right place. Or is this how it's suppose to work?