cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal report viewer print button does not work correctly

Former Member
0 Kudos

Hi Team

I am new to CE Reports and using crystal report viewer. Issue I am facing with Crystal report viewer is the print button is not opening the print options window. It is not even opening the pdf in the new window.

But when I see the console after clicking on the print button the pdf output is returned in the post request but does not display in the UI. Please find the screenshot below. Issue here is PDF content is returned before opening the printoptions popup and the content is not displayed to the user.

CE Version: CR 13 with SP5, .net sdk client Redistributable 32 bit 4.1 sp5.

Code:

  crystalReportViewer.ParameterFieldInfo = pfs;

                crystalReportViewer.HasExportButton = true;

                crystalReportViewer.HasDrillUpButton = false;

                crystalReportViewer.HasRefreshButton = false;

                crystalReportViewer.PrintMode = PrintMode.Pdf;

     ReportSource ceReportSource = (new ReportProvider()).RetrieveReportSource(enterpriseSession, reportID);

                    crystalReportViewer.ReportSource = ceReportSource;

References added:

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

What version are the CR assemblies you are referencing?

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow me on Twitter

Former Member
0 Kudos

Hi Ludek,

14.0.2000.0 is the version we are using. Print report is just refreshingthe page and post request is returning blank response.

Regards

Sudeep

former_member188030
Active Contributor
0 Kudos

Hi Sudeep,

For getting the print window, set the Print mode of the viewer to ActiveX.

If it does not bring up the print dialog box. Try installing the print controll manyally.

Extract the PrintControl.cab and register PrintControl.dll.

See this kb.

http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_b...

Thanks,

Bhushan

Former Member
0 Kudos

Hi Bhushan

Thanks a ton for help. print is now working but having few minor prolblems.

When I click on Print I am getting the error message below

And then the print dailog is opening. Able to print the data. AFter closing the print dailog I am still seeing the below popup.

Regards

Sudeep

former_member183750
Active Contributor
0 Kudos

Please see:

KBA 1561762 - "A Communication error has occurred. Printing will be stopped." appears when users try to ...

KBA 1624978 - "A Communication error has occurred. Printing will be stopped." appears when users try to ...

KBA 1206069 - Error: "A Communication Error Occurred. Printing will be stopped". IIS Compression causes ...

The above came up in a search using the search string 'crystal net printing stopped'. Search box is in top right corner.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow me on Twitter

Former Member
0 Kudos

Hi

I am now able to print succesfully using the windows print window that appears after the print button is clicked.

however the the background message box as in the screen shot below is not getting closed.

Regards

Sudeep

former_member183750
Active Contributor
0 Kudos

What changes allowed for the printing to proceed? E.g.; get rid of:

and what version is the crpe32.dll installed on your dev computer?

- Ludek

Former Member
0 Kudos

14.1.5.1501 is the version. If I use chrome I am getting the Crystal reports print control loaded with options print single page or set of pages. But if I use IE I am getting please wait print control is loading message.

I have modified code as following after which the print started working.

crystalReportViewer.PrintMode = PrintMode.ActiveX;

Print control is now not loading in IE

0 Kudos

Hi Sundeep,

Open IE and make sure you have this Add on enabled:

And verify your CrystalReportViewer default location:

C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13

Is there and that you have not included it in your project, if you did it is likely the wrong version

check your runtime... and dependencies.

Not clear in the case notes, are you using Version 13 or version 14 SDK?

Don

Former Member
0 Kudos

I am using Version 14.

I donot see any such add on on my machine IE settings. But when on my QA machine when print is accessed it is asking then to install the specified SAP AG plugin. But they are not intersted to install it as they dont want all the users to do that. Is there something we can do on the server to fix this issue and all our users see the crystal print viewer.

We have thousands of existing clients who are using CE10 now they are being upgraded to CE14 and they dont want to install any client side plugins with this upgrade as some of our clients dont even have admin rights to do the same

Please help.

Former Member
0 Kudos

Thankyou for the response.

I can see a folder cystalreportvierwrs14 at this path, C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\

how can verify if the default location for crystal reports viewer is set to it or not. Please help

0 Kudos

Fiddler should show you where it's being loaded from.

As for the other reply, they have to allow the plug-in to be updated. They likely have the old version there, IIS should detect the change and push it down to each work station.

Their IT people need to allow it.

Or they can try it manually... copy the printocontrol.cab file locally and extract and try running it....

Don

0 Kudos

What version of IE are you using?


0 Kudos

I confirmed this is an issue in IE 8. I upgraded to IE 11 and now the busy box shows the printcontrol is loading then the print dialog box appears. I can either print or cancel and the busy box goes away.

Upgrade your browser....

Don

Former Member
0 Kudos

Hi Don,

Print is still now working in IE9,10,11. But in IE11 when we click on print the browser is asking to install a plugin once I click on install, after a minute it says cannot load plugin.

Also is there a way to overcome this installation as we cannot ask all our clients to install this plugin.

However Export - > pdf is working fine for us. Is there a way to invoke Export - > PDF when user click on print.

Regards

Sudeep

0 Kudos

It's a permission issue, PrintControl is an activeX control so IE needs permission to install it.

Only way is to get their IT people to push it out under the Admin account.

Change your application, go to Properties for CR Viewer and change the PrintMode to PDF, this will pop up the Adobe PDF dialog box for printing. This also requires Adobe Reader be installed locally. If it's not installed or the user does not have access to the Adobe plug-in then they will get an export dialog box rather than the print dialog box.

Don

Former Member
0 Kudos

Hi Don

Thanks for your response.

I tried changing the print mode from active x to pdf. and now if I print I am getting response as applicaton/pdf(I can see in console network tab) . But I am not getting Open save cancel dailog asking to download.

I found problem with Content-Disposition, when print is clicked I am getting response with headers application-type as pdf and  Content-Disposition as inline. I changed the  Content-Disposition to attachment and everything worked.

Regards

Sudeep

Answers (1)

Answers (1)

0 Kudos

Download SP 13, SP 5 is old and had limitations for IE 10 and 11.

Don

Former Member
0 Kudos

Hi Don

I am using IE8/9. I have no option to install other version of SAP.

Please let me know what could be the cause of the issue

Regards

Sudeep