on 05-24-2017 9:26 PM
Hello,
When printing report via the print dialog that the WPF viewer displays after clicking the print button on the tool bar (see image 1 below), the viewer crashes after clicking the print button (see image 2 below) on the print dialog.
The third image below depicts the error message in Visual Studio 2013.
I have version 13.0.20.2399 of SAP Crystal Reports for Visual Studio.
Here is the code association:
private ReportViewer() //make its constructor private
{
InitializeComponent();
//set the crystal report viewer owner property to the this containing window
//(prevents errors when referencing formula fields in the report)
crystalReportsViewer1.Owner = Window.GetWindow(this);
//Initially hide tool panel view
this.crystalReportsViewer1.ToggleSidePanel = Constants.SidePanelKind.None;
private void DeptBatchIdCards_Report()
{
//variables to store report path
string exeFolder = System.Windows.Forms.Application.StartupPath;
string reportPath = System.IO.Path.Combine(exeFolder, @"ReportViews\DeptBatch_IdCards.rpt");
//create report document objects and set datasources for reports
ReportDocument deptBatchIdCardsReport = new ReportDocument();
deptBatchIdCardsReport.Load(reportPath);
deptBatchIdCardsReport.SetDataSource(_employeeBO.GetEmployeeIdCard_List(Client.gblClientID, _deptList));
//set the report source for the crystal report viewer
deptBatchIdCardsReport.Refresh();
this.crystalReportsViewer1.ViewerCore.ReportSource = deptBatchIdCardsReport;
}
Image 1.
Image 2.
Image 3.
Many thanks!
R
There have been updates to the WPF viewer in SP 22. One known issue is printing landscape on Windows 10 version 1709 and Windows 7 SP1.
It's been escalated and should have a fix in SP 23.
Can you guys test using SP 22 from here:
https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads
And PLEASE read the info for SP 21, must do the same for SP 22.
If you can then I'll confirm and get the fix in SP 23 if we can.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm having this same issue, have you found a solution?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I write from Bogota - Colombia and I have the same problem, press the print button and the crystal report generates an error, it must restart the application again. Why is this happening?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Don,
I'm printing to paper.
I also tried "Print to PDF" (not to an address book), which is also producing the same error as specified earlier.
Please see original post images of the exact results when printing from the WPF viewer.
I don't have a print routine (hence I cannot put a try/catch block), because the print function is executed via the WPF viewer toolbar print button.
Anyhow, the crash occurs on the print dialog itself after selecting printer and then clicking print.
Thanks many.
R.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Don,
Thanks for your input thus far.
However, when I've tried both x86 or x64 and updated the printer driver, I still get the same error result.
Also having the same error result with print to PDF option in the print dialog.
I've also went as far as uninstalling the SAP Crystal Reports for Visual Studio and then just installed the 32 bit runtime with the x86 for the project, and still also got the same error result.
Any other possibilities?
Thanks again.
R.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rudy,
Are you printing to Fax or to paper?
I installed the driver and I don't get an error or crash but it does not work due to permissions or when using Office 2016 because there are no people in the address book. And in 64 bit mode you need the 64 bit version of Office installed to be able to print to an address book.
If you print from the Viewer's print button what happens?
Put your print routine in a Try/Catch block and see what the exception is.Or use DebugDiag to see what dll it's crashing in.
Don
Is your project 32 or 64 bit?
Does that driver support either platform?
Does it work if you print from CR Designer?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Don,
Thanks for your input thus far.
However, when I've tried both x86 or x64 and updated the printer driver, I still get the same error result.
I've also went as far as uninstalling the SAP Crystal Reports for Visual Studio and then just installed the 32 bit runtime with the x86 for the project, and still also got the same error result.
Any other possibilities?
Thanks again.
R.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.