Click here to Skip to main content
11,431,483 members (65,532 online)
Rate this: bad
good
Please Sign up or sign in to vote.
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 9-Jul-12 23:11pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
v2
Comments
coolnavjot31 at 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 at 10-Jul-12 18:31pm
   
I like the last line of your answer Vani Kulkarni. Good on you.
coolnavjot31 at 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.....
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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
  Permalink  

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



Advertise | Privacy | Mobile
Web02 | 2.8.150428.2 | Last Updated 27 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100