cancel
Showing results for 
Search instead for 
Did you mean: 

Operation Completed successfully error when printing from crystal reports

Former Member
0 Kudos

HI, I developed a crystal report in Crystal Reports 11.5 Release 2 in .NET, which will print directly from the application using "currentreport.printtoprinter" without opening report viewer.

I Deployed the application on the server machine having Win 2003 as O.S.

The print page throwing an exception as u2018Operation Completed successfullyu2019.

exception details : System.ComponentModel.win32Exception:The operation Completed Successfully.

i am using the following code

CurrentReport.PrintOptions.PrinterName = "EasyCoder"

CurrentReport.PrintToPrinter(1, False, 1, 1)

CurrentReport.Close()

CurrentReport.Dispose()

NOTE: We are using crystal reports 11.5 release 2 and Visual Studio 2005.

Can any body help me out from this issue ?

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Is this a web or a win app?

How did you deploy the CR runtime?

What CR Service Pack are you working with?

Does the report actually complete printing despite the error?

Ludek

Former Member
0 Kudos

Hi ,

1) It is web application.

2)i used VS2005 setup and deployement and installed the same in server.

3) Crystal xi Release 2

4) No i did'nt, When printtoprinter executes statement it is giving error

Thanks

Raju.

former_member183750
Active Contributor
0 Kudos

2)i used VS2005 setup and deployement and installed the same in server.

- what is the name of the actual Crystal Reports msm / msi you used?

Ludek

Former Member
0 Kudos

HI,

It is CrystalRedist115_x86

Thanks

Raju.

former_member183750
Active Contributor
0 Kudos

OK, that is a pretty strange error for that version of CR. Not having seen an error like this before, I'd like to try this with one of our sample apps. This file contains a number of samples:

https://smpdl.sap-ag.de/~sapidp/012002523100006252812008E/net_web_smpl.exe

I'd recommend vbnet_web_simplePreviewreport

Get the app working on your dev box first (see the readme file that comes with the app). Compile the app then transfer it to your server. See if this works.

Ludek

Former Member
0 Kudos

Hi,

I cant open ur test application. it says it will extract and not doing anything.

FYI , i am having barcode in the label which is printing.

Can you guide me how to test ur link.

Thanks !

former_member183750
Active Contributor
0 Kudos

FYI , i am having barcode in the label which is printing.

- is the barcode font exposed to the worker process?

- do reports that do not have the barcode work?

Try to redownload the sample app, perhaps the file got corrupted during download. Also, download our sample win apps from here:

https://smpdl.sap-ag.de/~sapidp/012002523100006252822008E/net_win_smpl.exe

See if you can print from the vbnet_win_simplepreviewreport app.

Ludek

Former Member
0 Kudos

Hi,

I noticed that any report which we are trying to print using printtoprinter command in code is not working.

May i know what is that samples u sent in the link for?

Thanks !

former_member183750
Active Contributor
0 Kudos

May i know what is that samples u sent in the link for?

Well,

1) I don't know what your app does...

2) I do know that you are getting a rather weird error.

3)I also know that the sample apps contained in the link provided work.

4) A win app removes all kinds of permission issues that a web app may have, thus giving us another piece of the puzzle. If a win app works, yet web app does not, we are more that likely looking at permissions. If it neither works, we're looking at environmental issues (see more below).

Thus to me it is logical to try something I am very familiar with. If it works, you'll need to compare the sample app code to your code. If the sample app does not work, we may possibly be looking at the environment. This could include CR dll versions, SPs - both CR and OS, etc., etc. In your last post you mention that this is occurring when using print to printer. In the sample apps you will find vbnet_win_pritotprinter sample app. Try it. Also, make sure the printer drivers are visible to the worker process. See this thread on how to do that:

It all comes down to basic troubleshooting. For more details, see this blog:

Ludek

0 Kudos

What happens if you print from the Viewer using the CR Print button, not the browsers print button.

Former Member
0 Kudos

I am having a similar issue. I am not using any subreports at all; just trying to print one report using PrintToPrinter command. This works fine from within my development environment; however, when I deploy it on the server with the merge modules, it hangs in the PrintToprinter function forever. Any ideas? I don't think this is an installation related issue. Any help will be appreciated.

Thanks.

Faisal

former_member183750
Active Contributor
0 Kudos

I'd recommend creating a new thread for this issue.

Ludek

Former Member
0 Kudos

hi ,

I also got the same error message .

First i got the below error

Message: Object reference not set to an instance of an object.

Stack Trace :

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.get_IsLoaded()

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)

Followed by

Message: The operation completed successfully

Stack Trace :

   at System.Drawing.Printing.StandardPrintController.OnStartPrint(PrintDocument document, PrintEventArgs e)

   at System.Drawing.Printing.PrintController.Print(PrintDocument document)

   at System.Drawing.Printing.PrintDocument.Print()

   at CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)

Can you please explain why object reference error will come while Load event of Reportdocument.

Answers (0)