Crystal report print error when canceled by user in VS2003

Hi ,
I have a problem with print in crystal report using VS2003.
Code region
CrystalRpt rptdoc = new CrystalRpt();
System.Drawing.Printing.PrintDocument printDocument = new System.Drawing.Printing.PrintDocument();         
rptdoc.PrintOptions.PrinterName = printDocument.PrinterSettings.PrinterName;              
  rptdoc.PrintToPrinter(1, true, 0, 0);
End Code
CrystalRpt is the crystalreport that I use.
when user clicks cancel in the print dialogbox that appears, it throws the error.
Please find the stack trace below:
Exception Text **************
CrystalDecisions.CrystalReports.Engine.InternalException: Error in File C:\DOCUME1\RAKESH1.RED\LOCALS~1\Temp\temp_d047ddc7-9297-4a24-a03f-11f21917120a.rpt:
Request cancelled by the user.
at  . I(String   , EngineExceptionErrorID   )
at  . D(Int16   , Int32   )
at  . C(Int16   )
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)
at SampleCrystal.Form1.btnPrint_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr
When I implement the same code using VS2008, i dont get the error.I found it specific in VS2003.
Thanks in advance.
Rakesh Reddy

Hi,
Can be a permissions issue.
Try giving the ASPNET account full control on Temp folder :
    . Right-click the folder and select 'Properties'.
    . Go to the 'Security' tab and click the 'Add' button.              
    . Select the 'ASPNET'. Click 'ADD'. Click 'OK'.
    . Check 'Full Control' from 'Permissions for 'ASPNET'.   
Sincerely,
Nikhil Dharme

Similar Messages

  • Crystal report print button greyed out in user citrix sessions

    Hi,
    We are running Citrix Enterprise Server 4.5 on Windows 2003 servers.
    We have a ERP app called Epicor 7.3.6 installed on them.
    Crystal Reports 9 is installed on all these servers and the epicor app displays and prints crystal reports.
    Some users when logged into their Citrix profile session and running Crystal Reports from within Epicor application can not print the Crystal report because the Print button is greyed out.
    We have compared users that can print against users who can not not print and not found anything at the network, file permissions, application permissions, printer setup setting level.
    Also, if we were to take citirx completely out of the discussion, what might cause the print button to be greyed out in a crystal report when it is displayed (not the developer, but in the minmal window that shows the export, print, magnify options only).
    Thanks
    Chris

    Check with Epicor. We don't know how Epicor implemented the solution so it's kinda like you asking a mechnic to fix your car, but he can't open the hood to see the engine.
    A tip; this is more than likely due to permissions. So, compare between boxes thast work and don't work. Use [Process Monitor|http://technet.microsoft.com/en-ca/sysinternals/bb896645.aspx] to track permission issues.
    Ludek

  • Crystal Report Print Error

    Hi I am having the strange issue.
    When my application is running as windows service, the RAS engine is not printing the report.
    I am getting the below error.
    //Code Snippet
         PrintReportOptions printOptions = new PrintReportOptions();
         printOptions.setPrinterName(printername);
         printOptions.setPaperSource(PaperSource.auto);
         printOptions.setPaperSize(PaperSize.paperLetter);
         printOptions.setNumberOfCopies(1);
         printOptions.setCollated(false);
         rcd.getPrintOutputController().modifyPageMargins(850, 250, 250, 250);
         //Print report.
         rcd.getPrintOutputController().printReport(printOptions);
    Any one could help me on this?
    Thanks
    Sumathi
    Msg:java.awt.print.PrinterAbortExceptionStack:com.businessobjects.crystalreports.viewer.core.f.print(Unknown Source)
    sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1936)
    sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1431)
    com.businessobjects.crystalreports.viewer.core.f$a.a(Unknown Source)
    com.businessobjects.crystalreports.viewer.core.f.a(Unknown Source)
    com.businessobjects.crystalreports.printer.bean.a.ck(Unknown Source)
    com.businessobjects.crystalreports.printer.bean.ReportPrinter.print(Unknown Source)
    com.businessobjects.crystalreports.printer.bean.ReportPrinter.print(Unknown Source)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    com.crystaldecisions.sdk.occa.report.application.PrintOutputController.printReport(Unknown Source)
    com.crd.report.crystal.CrystalReportUtil.exportReport(CrystalReportUtil.java:2094)
    com.crd.report.biz.CRDReportingFactory.exportReport(CRDReportingFactory.java:336)
    com.crd.report.app.ReportingImpl.generateReport(ReportingImpl.java:115)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    com.crd.services.ServiceProxyFactory$LocalHandler.invoke(ServiceProxyFactory.java:374)
    $Proxy19.generateReport(Unknown Source)
    com.crd.exporter.router.DefaultReportWriter.generateReport(DefaultReportWriter.java:50)
    com.crd.exporter.router.Router.route(Router.java:286)
    com.crd.exporter.router.Router.dispatchPackage(Router.java:191)
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKPrinterException: Report could not be printed.---- Error code:-2147467259 Error code name:failedStack:com.businessobjects.crystalreports.printer.bean.a.ck(Unknown Source)
    com.businessobjects.crystalreports.printer.bean.ReportPrinter.print(Unknown Source)
    com.businessobjects.crystalreports.printer.bean.ReportPrinter.print(Unknown Source)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    com.crystaldecisions.sdk.occa.report.application.PrintOutputController.printReport(Unknown Source)
    com.crd.report.crystal.CrystalReportUtil.exportReport(CrystalReportUtil.java:2094)
    com.crd.report.biz.CRDReportingFactory.exportReport(CRDReportingFactory.java:336)
    com.crd.report.app.ReportingImpl.generateReport(ReportingImpl.java:115)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    com.crd.services.ServiceProxyFactory$LocalHandler.invoke(ServiceProxyFactory.java:374)
    $Proxy19.generateReport(Unknown Source)
    com.crd.exporter.router.DefaultReportWriter.generateReport(DefaultReportWriter.java:50)
    com.crd.exporter.router.Router.route(Router.java:286)
    com.crd.exporter.router.Router.dispatchPackage(Router.java:191)

    Hi,
    Can be a permissions issue.
    Try giving the ASPNET account full control on Temp folder :
        . Right-click the folder and select 'Properties'.
        . Go to the 'Security' tab and click the 'Add' button.              
        . Select the 'ASPNET'. Click 'ADD'. Click 'OK'.
        . Check 'Full Control' from 'Permissions for 'ASPNET'.   
    Sincerely,
    Nikhil Dharme

  • Crystal Reports 2008 - ERROR when changing datasource

    Hi, I have a report that is connected to a test database that needs to have the datasource changed to the production database.
    The Crystal Report has 2 "on-demand" subreports that the datasource has been changed for as well.
    SQL 2000 Databases on 2 different servers (W2003) used the "Set Datasource Location" and followed steps listed previously in the forum.
    Databases have different names but all tables are same in both.
    Database Expert is showing all tables coming from new datasource BUT when report is run parameter prompt comes up, click ok
    Error message - "Failed to retrieve data from the database" - click OK
    Error message - "Invalid Argument provided"
    Does anyone have an ideas on how to track down the issues.
    Please let me know if you need any other information

    Ok answers below:-
    1. Crystal Reports 2008 Cersion 12.1.0.892
    2. Connecting via OLEDB
    3. Yes able to refresh newly created report without sub reports enclosed
    4. Didn't know that this could be done - this report was done for us by a consultant who doesn't know how to fix this issue and reckons there is a bug in Crystal
    5. Sub reports are accessed after main report is run (I think that means that they are linked)
    6. Not sure how to do this as am newbie to Crystal Reports and we are relying on the person that we contracted to write the reports to know what he is doing.
    Any help appreciated I will try to go into the sub report and unlink - think I have found out how to do this.
    Thanks for the help so far!!

  • Crystal Reports XI - Error when displaying report

    Hi Guys,
    I'm using Crystal reports XI release 2. I'm attempting to get some data from an Oracle database and display it as a Crsytal Report onto a JSP. Tomcat 5.0 is being used.
    At first I was using Crystal XI and than upgraded to Release 2.
    Here's the error message I'm getting when report is rendering:
    "Null page: Unable to create page from report source."
    And the stack trace for the error is:
    Exception at EPFPageFactory.getPage: java.lang.Exception: Error in EPFImapgeObjectInstancesBase.getInstanceProperties: null epfImage
    At this point I have not found any references at all on the web regarding this issue. It's been a long time now since I've been trying to use Crystal - Java and I've hot succeed to do so. I only find an article which said There's a hot fix which solves this issue, I installed it but nothing really happened, I kept getting the same error.
    Please , any help will be greatly appreciated.
    Best Regards,
    Esteban

    even i am trying the same if u get something pls do let me know

  • Crystal Report Printing Error

    Hi, All
    When I run rpt file from SBO, it always promts me to enter SQL username and password, even though I am 100% sure I entered them correctly. Anybody can tell me what's wrong.
    the client OS is XP

    Hi, Gordon
    NO error Message.
    Actually it always promts me to enter the username and password when I press OK.
    Ke

  • Seagate Crystal Reports: Database Error

    I am using Crystal reports Version 8 and frequently get the error 'Seagate Crystal Reports: Database Error' when I try to open a previously working crystal report file. The error occurs when I click on the Database menu. Every time I get this error I end up redesigning the report as the I have not yet found a solution and I cant run the report.
    The error is a message box with the title 'Seagate Crystal Reports: Database Error' and an ok button - nothing else.
    Its very frustrating!
    Please help.
    Thanks.

    Hi,
    What database are you using and how are you connecting to it? 
    What are you clicking in the Database menu:  Set Location, Verify Database, Show SQL Query?
    Before opening the report, can you connect to the database first then open the report? 
    I would have expected an error code or a more descriptive error to follow. 
    Thanks,
    Brian

  • Crystal Reports: Print Engine Error when exporting a report

    We recently upgraded from Crystal Reports 2008 to BusinessObjects Edge Series X3.1. When exporting a report to an excel data-only format we get "Crystal Reports: Print Engine Error". All other formats work fine.  Any help is highly appreciated.
    Thanks,
    Jaseem

    Anyone?

  • Crystal Report Print Control install error

    Hi,
    I'm trying to manually install the crystal report print control active x file. After righ-clicking to install the printcontrol.inf file, i got the following error message; "The INF you selected does not support this method of installation" Any idea why I could not install?
    I am running Windows Vista and have local admin rights.
    Thanks in advance.

    Umm, when I enter the following search terms in the search box at the top right corner of this web page:
    print control activex crystal net
    I get the following KB:
    [1645006  - How to install the Crystal Reports ActiveX Print Control manually?|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333633343335333033303336%7D.do].
    See if that helps. Note that since you do not mention version of CR, the KB may not be specific to your version of CR, but it should point you in the right direction, no matter what the version.
    - Ludek

  • Crystal Report not working when posting the report to the Crystal Server.

    Hi All,
      I created a report using Crystal Reports 2008 with two ODBC connections (User DSN's). When I run the report in Crystal Reports (where I originally created it) it runs fine with no problems.
       I am now trying to load it on Crystal Server 2008. When I try to run this report in InfoView, I get a message: "Error Failed to open the connection." I am thinking that it has to do with the ODBC connections but I am not quite sure. Could someone lead me in the right direction? How will the report that I now saved in the repository on the server connect to the ODBC stream?
       Thank you in advance.

    Solved my problem. I had to tweak the ODBC drivers on the server.

  • Crystal report unexpected error in Web service (IIS)

    We are using Crystal report in web service.
    We faced some problem due to crystal report unexpected error.
    Refer the below error message.
                Xception E NSF      NSFZ1100 20100608 145511565 GPRAB0 : GPRZ10  [GUEC0001] [1] [AbstractService] Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
                Xception E NSF      NSFZ1100 20100608 145511972 GPRAB0 : GPRZ10  [GUEC0001] [1] [AbstractService]    at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)
                   at System.Windows.Forms.MessageBox.Show(String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon)
                   at CrystalDecisions.Windows.Forms.CrystalReportViewer.HandleExceptionEvent(Object eventSource, Exception e, Boolean suppressMessage)
                   at CrystalDecisions.Windows.Forms.CrystalReportViewer.HandleExceptionEvent(Object eventSource, Exception e)
                   at CrystalDecisions.Windows.Forms.ReportDocumentBase.GetLastPageNumber()
                   at CrystalDecisions.Windows.Forms.ReportDocumentBase.GetLastPage()
                   at CrystalDecisions.Windows.Forms.DocumentControl.ShowLastPage()
                   at CrystalDecisions.Windows.Forms.PageView.ShowLastPage()
                   at Biz.Nissan.Cats.CORE.REPORT.LibCrystalReport.TotalPageCount(ReportDocument Rpt)
                   at Biz.Nissan.Cats.CORE.REPORT.LibCrystalReport.Print(BaseReport RptDefinition)
                   at Biz.Nissan.Cats.CORE.REPORT.MCTLIST260Print.Print(IFData ifData)
                   at Biz.Nissan.W3.CATS.BC.Service.DistributeService.ExecuteMpp()
    How we get the actual error from crystal report?
    Thanks in Advance

    What is the workflow
    What is the application doing?
    Iu2019m guessing you have a windows service application and you're trying to launch a UI (ie the viewer control) from the application or print using the vieweru2019s printing functionality programmatically(?).
    If this is a Windows Service running under the local system account, then follow the instructions in the error message. (ie, bring up the properties of the service, go to the logon tab and check the checkbox that says u201CAllow service to interact with desktopu201D.   At least that should allow whatever popup is trying to come up display properly.
    Ludek

  • Crystal report font issue when rendered as PDF

    Hi we are experiencing an issue with custom fonts within Crystal reports.  The font is an open type font that does appear to work if the report is viewed as a crystal report, but when it is rendered or scheduled into a PDF instance it fails and gives a Crystal Reports: Print Engine Error when using openDocument and scheduling gives exporter error. Any help or feedback is appreciated

    Aaron,
    OpenType is not supported for PDF at least in:
    Crystal 10
    https://service.sap.com/sap/support/notes/1218086
    XIR2
    https://service.sap.com/sap/support/notes/1219411
    The ADAPT indicated has been postponed.
    I canu2019t find an official statement for XI 3.1, however, there is a test you can run and itu2019s to delete the Opentype font from the server and use the same font name but TTF instead.  At least, this behaviour has been reported here:
    https://service.sap.com/sap/support/notes/1303394
    Regards,
    Julian

  • Failed to read data from report file : Reason: Crystal Reports: Print Engin

    Hi,
    When we try to migrate the crystal reports from BO R2 to BO R3, some of the reports are faling with the error:
    Failed to create a new Report.Reason: Failed to read data from report file C:\DOCUME~1\xxxxx.rpt. Reason: Crystal Reports: Print Engine Error
    Would please someone help me in fixing the issue.
    Thanks and Regards,

    Few quick checks to identify the cause -
    1. Are you able to run report in your R2 system?
    2. In XI3.1, check SIA running on which account.
    3. Check the acount have sufficient rights on file system and registry.
    4. What's your web server?
    Give proper rights and import again. Hopefully it will resolve.
    Edited by: Das on Dec 6, 2010 9:47 PM

  • Crystal Report Viewer Error: Could not render the page

    Hi,
    I was facing the same issues whereby i creating my crystal report in VS2005 profesional built in crystal report designer. When preview in VS2005 the graph displayed correctly. However, when export to IIS it shows the error could not render the page.
    I am using Windows 2008 server, IIS7.
    I tried to install the CRREDIST x86.msi into my server, however it still could not show out the graph (pie chart) in the localhost.
    Appreciated anyone know this could kindly advice.
    thanks.
    ck

    Hello,
    Crystal Reports 10 is not supported on Windows 2008 Server.
    Please view the information [here|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_dev/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do]
    Upgrade the Crystal Reports.
    Thanks,
    Bhushan.

  • Crystal Report XI Error:717

    Error:717
    Hi,
    We use Crystal Report XI developer with Oracle 10g.
    Our Oracle Client is Oracle 10g and the Oracle server is Oracle 10g.
    Our application develepor tool is CodeGear RAD Studio, Delphi 2007 Enterprise.
    The Crystal Report use the Native Oracle Connection.
    When the applicatin run, and we call the Crystal Report, an error occure:
    Error:717 Error in file c:sample.rpt
    Failed to load database information
    Execute
    Please help me!
    Thanks
    Sándor Lencsé

    I would make verify the database within Crystal report and then re publish it again. It seems it doesn't get the connection to the db.
    Have you refreshed the database within Crystal Reports?
    As Graham said, does it open in Crystal Viewer?
    another thing would be to add the DSN (System DSN) onto your client machine as well. Maybe it is not getting a right connection.
    Try it and let us know.
    Kind Regards
    Jehanzeb

Maybe you are looking for

  • ORA-06512:OWA_UTIL AT LINE 354

    Hello, I created a new procedure to update the table through web page. I use html commands and owa_util package to get the user id owa_util.get_cgi_env('REMOTE_USER') I am using same code in lot of other procedures and they are all working. When I ru

  • Font Conflict

    I just installed Tiger (10.4.9) and am now having font conflicts. I purchased fonts from fontdiner.com and 8 of the 12 fonts are now "in conflict" with system fonts. Nothing else has changed but the installation of Tiger. Hope someone can help me. Th

  • Dot1x machine auth before user auth required

    We are looking at setting up dot1x in our libraries however I have been asked to see if there is a way to force a switch port to require machine auth before user auth.  The reason for this is a problem we have that users will disconnect the ethernet

  • TS3694 IPHONE 3G CANNOT RESTORE AND UPDATE ERROR CODE 1015

    IPHONE 3G CANNOT RESTORE AND UPDATE ERROR CODE 1015

  • Snippets, Sites - how to pass from CS4 to CS5

    I saved my Snippets from CS4. How do I get them inside CS5? Where is the file where I should put them? Please provide the complete path for Windows 7. Thanks