Using Visual Studio 2010 sp1 with Crystal for VS 2010. Web app running as a web application in x86 mode using .NET 4.0 framework.
I recently created a CR with a sub-report and it previews and prints just fine. However, after I PRINT the report, my code behind in the ASPX file is not recognized and thus fails.
For example, I created a 'Back' button to redirect the CR aspx back to the calling aspx file and it works just fine if I only view the report. If I click on the printer icon located on the report viewer toolbar, the button stops working. In fact, none of the code behind syntax is recognized and the aspx file just does a page_load.
I know this code works because it does work if I DON"T print the report:
protected void btnBack_Click(object sender, EventArgs e)
{
Response.Redirect("~/NewCase.aspx");
}
I also have a 'Submit' button that changes the data parameters for the report and it works great but after I print the report, it will not work either. (I've tried to upgrade to sp2 but I get an error with the installation process... so still trying to figure that out.)
protected void btnSubmit_Click(object sender, EventArgs e)
{
CrystalReportViewer1.RefreshReport();
}
To summarize, All the code I listed works fine if I do not try to print the report and just view it. After I click the printer icon, the code stops being recognized and the aspx page just refreshes.
I've searched for help on the web for a couple of days to no avail; so I am thinking it must be some issue with the report viewer.
Any help would be greatly appreciated.
Paul