CSharp/C# >> Crystal Reports Print Error

by Peter » Fri, 15 Aug 2008 01:21:19 GMT

I have .NET3.5 Windows Service application which prints Crystal Reports and
once in a while I get the following error, if I try to print right after the
error everything works just fine. Does anyone know what might be causing
this problem?

The error is occuring at CrystalReport.Print(String printer, Int32 copies,
Boolean collated, String paperSource) line

Thank You


Peter

System.AccessViolationException: Attempted to read or write protected
memory. This is often an indication that other memory is corrupt.

at System.Drawing.SafeNativeMethods.PrintDlg(PRINTDLGX86 lppd)

at System.Drawing.Printing.PrinterSettings.GetOutputPort()

at System.Drawing.Printing.PrinterSettings.FastDeviceCapabilities(Int16
capability, IntPtr pointerToBuffer, Int32 defaultValue, String printerName)

at System.Drawing.Printing.PrinterSettings.Get_PaperSources()

at System.Drawing.Printing.PrinterSettings.get_PaperSources()

at CrServer.CrystalReport.Print(String printer, Int32 copies, Boolean
collated, String paperSource)



CSharp/C# >> RE: Crystal Reports Print Error

by jialge » Fri, 15 Aug 2008 14:54:57 GMT


Hello Peter,

This sounds like a Crystal Report Development issue. I'm not an expert on
CR. Microsoft supports setup and installation for the Crystal Reports
products that are included with Microsoft Visual Studio. All other support
is provided by Business Objects. We would like to suggest you post the
question at https://www.sdn.sap.com/irj/sdn/businessobjects-support

For more details, please refer to the KB article:
http://support.microsoft.com/kb/317789/en-us
[Licensing and support for Crystal Reports for Visual Studio .NET and for
Visual Studio 2005]

Regards,
Jialiang Ge ( XXXX@XXXXX.COM , remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
XXXX@XXXXX.COM .

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx #notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

CSharp/C# >> Crystal Reports Print Error

by Peter » Mon, 08 Sep 2008 08:31:19 GMT

Installing Crystal Reports service pack 1 fixed the problem.

CSharp/C# >> Crystal Reports Print Error

by jialge » Mon, 08 Sep 2008 13:37:03 GMT

Thank you very much for sharing the solution with us!

Regards,
Jialiang Ge ( XXXX@XXXXX.COM , remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
XXXX@XXXXX.COM .

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================

Similar Threads

1. Crystal Reports printing error - VB.Net

2. Crystal Report Old version vs Visual Studio .net Crystal report

Hi,

I have noticed that Visual studio 2005 coming along with Crystal report. 
I have few crystal reports which is developed in 6.0 in my existing VB 
project and currently we are migrating m y VB application to C#.net. 

In the crystal report site, I am not sure whether I have to redesign reports 
in Visual studio .net (or) Can I use the existing reports it self. 

My question is If I open my existing crystal reports (ver 6.1)  in Visual 
studion .net 2005 and save it as a new file, will it work without any 
problem?? I would appreciate if any body can give some ideas about this.

Thanks

3. Crystal Reports for VS 2005 Error on Print - Microsoft .NET Framework

4. Error printing to local default printer using Crystal report Document.printtoprinter

I'm getting this error message trying to print to the local default printer 
(connected using a usb cable):
"Analysis Server: Invlid printer specified"
I have no problem printing to other network printers from Crystal report (in 
VB.NET) using the following codes:

myReport.RecordSelectionFormula = mSelection

myReport.PrintOptions.PrinterName = printName

myReport.PrintToPrinter(1, True, 0, 0)



Thanks



Bill


5. error during printing in crystal report - VB.Net

6. print crystal report without showing windows print box

I'm using the CrystalReportViewer1.PrintReport() method in a vb.net exe
but DO NOT want the Windows Print Box to appear
(I require the report to print directly)

7. Print option not available in Crystal Report reports using SQL Stored procedure - VB.Net

8. Printing Crystal Report

Hello everybody,

I need to print existing Crystal Report from my application.  What I
have:

ReportClass myReport = new ReportClass();
myReport.FileName = 揅:\卻ome path to the report file?
myReport.SetDatabaseLogon(搖serid? 損assword? 搒erver? 揹atabase?;
myReport.PrintOptions.PrinterName = 搒ome printer?
m_ myReport.PrintToPrinter(1, false, 0, 0);

Some problem appears in SetDatabaseLogon(...) function.  It returns
error:
揢nable to connect: incorrect log on parameters? which is absolutely
wrong message, because all parameters are OK.  For debugging purpose I
just hard coded 搖serid? 損assword? 搒erver? 揹atabase?while using
SetDatabaseLogon function.  And without any problem  using these
parameters I could login to Query Analizer or Management studio, also
I could open the report and create new connection using these
搖serid? 損assword? 搒erver攨

Does anybody has any idea what am I missing?  What am I doing wrong?

Thank you in advance,
Alex