Click here to Skip to main content
15,904,416 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello Every One,

I am working in asp.net web application. I am showing records in crystal report. but at run time print button and export buttons are not working. I am using visual studio 2010.

please give me any solution. how they will work.
Posted

The Crystal Reports toolbar export and print functions for ASP.NET are driven by javascript functions. The error you are receiving is because the javascript files are not present on the server.
Check this directory path: aspnet_client\system_web\2_0_50727\CrystalReportWebFormViewer3\JS.
You will find the aspnet_client directory under the parent website that your virtual directory is in. The CrystalReportWebFormViewer3 directory contains subdirectories for images, html, css, and js. If the server does not have these directories or they are incomplete then copy these files from your local development server to recreate these directories and the files in your server.

For more information, have a look at following links:
http://forums.asp.net/t/992330.aspx[^]
http://stackoverflow.com/questions/1898590/crystal-report-viewer-print-export-buttons-not-working-in-asp-net-mvc-app[^]
Crystal Report Viewer Export & Print buttons are not working in VS 2008[^]

Also please do search Google[^] before you post any questions here in this forum.
 
Share this answer
 
v2
Comments
coolnavjot31 10-Jul-12 4:45am    
thanks for reply but now i am working in my local computer and it is not working on my computer too.
ShaikhM 10-Jul-12 18:31pm    
I like the last line of your answer Vani Kulkarni. Good on you.
coolnavjot31 11-Jul-12 0:30am    
as i have already asked my question and for your information Vani Kulkarni. after searching on google i write here my question.....
Simply you can do one thing. on page_load check Page.isPostBack event is true or false. If true means put the code to load crytal report. problem will be solved.

protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
// you code here
}
else
{
generate-report();
}

}
it works for me. try it
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900