on 10-29-2008 8:25 AM
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 ?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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
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.
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.