Results 1 to 31 of 31

Thread: [RESOLVED] Error trying to print a Crystal Report after deployment

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2010
    Location
    Lake Gaston, NC
    Posts
    453

    Resolved [RESOLVED] Error trying to print a Crystal Report after deployment

    Using VB 2010 Professional and CR 13.

    Everything prints just fine until I deploy my application. After deployment, I get the following error message when I try to print a Crystal Report.

    Name:  SnipCapture.PNG
Views: 1919
Size:  10.9 KB



    This is the code I am using to print my reports.

    Problem Code:
    1. ReportToPrint = "VehicleInventory"
    2.             MySqlStmt = "SELECT * FROM DealershipTable; SELECT * FROM VehiclesTable WHERE VSold = 'No'"
    3.             MyRpt = "C:\Program Files\AbcCryRpts\VehicleInventory.rpt"
    4.  
    5.  
    6.                 Dim conn As SqlConnection = New SqlConnection()
    7.             conn.ConnectionString = sMyConnectionString
    8.                 conn.Open()
    9.                 Dim DtaAdptr As SqlDataAdapter = New SqlDataAdapter(MySqlStmt, conn)
    10.                 Dim RptDataSet As DataSet = New DataSet()
    11.                 DtaAdptr.Fill(RptDataSet)
    12.                 conn.Close()
    13.                
    14.                 Dim RptDoc As ReportDocument = New ReportDocument
    15.                 RptDoc.Load(MyRpt)
    16.  
    17.             RptDoc.Database.Tables("DealershipTable").SetDataSource(RptDataSet.Tables(0))
    18.             RptDoc.Database.Tables("VehiclesTable").SetDataSource(RptDataSet.Tables(1))
    19.  
    20.             CrystalReportViewer1.ReportSource = RptDoc
    21.             CrystalReportViewer1.Refresh()


    What am I doing wrong?

  2. #2
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: Error trying to print a Crystal Report after deployment

    You probably need to install the CR runtime engine. Look at this http://scn.sap.com/docs/DOC-19262

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2010
    Location
    Lake Gaston, NC
    Posts
    453

    Re: Error trying to print a Crystal Report after deployment

    I'm getting this message on the same computer that I developed the report on(my development computer), does your suggestion still apply?

  4. #4
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: Error trying to print a Crystal Report after deployment

    Everything prints just fine until I deploy my application.
    I'm getting this message on the same computer that I developed the report on(my development computer)
    I don't understand what your trying to say. Those statements contradict each other.

  5. #5
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,537

    Re: Error trying to print a Crystal Report after deployment

    Compile it. Deploy it. Start your app... BEFORE doing anything else... go back to VS, and select Attach to Process from the Debug menu (Ctrl+Alt+P) find your app in the list of running processes. Select it, and click Attach.


    Now, go back to your app and use it... at the point it breaks, it shoudl drop down into the code and show you where the error is... once you know that, you'll be better equiped to knw how to fix it.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: Error trying to print a Crystal Report after deployment

    Quote Originally Posted by techgnome View Post
    Compile it. Deploy it. Start your app... BEFORE doing anything else... go back to VS, and select Attach to Process from the Debug menu (Ctrl+Alt+P) find your app in the list of running processes. Select it, and click Attach.


    Now, go back to your app and use it... at the point it breaks, it shoudl drop down into the code and show you where the error is... once you know that, you'll be better equiped to knw how to fix it.

    -tg
    Never new you could do this. Sounds like a great tool. I must not be understanding what he means by deploy. I've never had an app that would run in the IDE but not as an exe on the same machine.

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2010
    Location
    Lake Gaston, NC
    Posts
    453

    Re: Error trying to print a Crystal Report after deployment

    Yes. I'm running both on the same machine.

    Using your great idea I got:

    Name:  CRErrMsg.PNG
Views: 1756
Size:  29.7 KB


    This is a shot of my computer from Control Panel.

    Name:  CR.jpg
Views: 1641
Size:  10.3 KB

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2010
    Location
    Lake Gaston, NC
    Posts
    453

    Re: Error trying to print a Crystal Report after deployment

    I got down as far as the "DotNet1" folder and it wasn't there, just the "DotNet" folder shown below.

    Name:  CrProbFileLoc.jpg
Views: 1802
Size:  41.0 KB

    How do I go about fixing this?

  9. #9
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,537

    Re: Error trying to print a Crystal Report after deployment

    Quote Originally Posted by wes4dbt View Post
    Never new you could do this. Sounds like a great tool.
    It's a freakin diety send... I use it heavily with the web services I work with... once I deploy them to my local IIS folder for the application, I can attach to the W3Service process... then anytime my server components break, it drops down into the code.

    Quote Originally Posted by wes4dbt View Post
    I must not be understanding what he means by deploy. I've never had an app that would run in the IDE but not as an exe on the same machine.
    It can happen when a dll is referenced with "copy local = yes" but isn't included when deployed to the "run-time" folder.
    IT can also happen when something, like oh the current or application directory, is different or different permissions - ie, I might have permissions on a folder in my bin folder, but under My Programs, I won't... it's rare for it to happen, but it does.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2010
    Location
    Lake Gaston, NC
    Posts
    453

    Re: Error trying to print a Crystal Report after deployment

    This is the first part of my appconfig file.

    Name:  AppConfig.PNG
Views: 2166
Size:  8.7 KB

    Thanks for your help.

    I don't know how I should proceed?

  11. #11
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,537

    Re: Error trying to print a Crystal Report after deployment

    AppConfig isn't the issue here... it's how the CrX components were referenced and whether they need to be included in the deployment or not. If you got to the Bin folder, what's there? are any of the CrX files there?

    To be honest, I'm a little perplexed by this... if I remember right, CrX wants to deploy to the GAC... which means it should be universally available ...


    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2010
    Location
    Lake Gaston, NC
    Posts
    453

    Re: Error trying to print a Crystal Report after deployment

    In my Bin folder, all I have is the Debug and Release Folders.

    Backing up one in the path, I have the CR files shown below:
    Name:  Capture.jpg
Views: 1630
Size:  9.5 KB

  13. #13
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: Error trying to print a Crystal Report after deployment

    Easiest fix would be to find a copy of crdb_adoplus.dll and put it in the dotnet1 folder, (I think I had to do that before). also, check your references and see if that file is listed.

  14. #14
    Frenzied Member
    Join Date
    May 2014
    Location
    Central Europe
    Posts
    1,372

    Re: Error trying to print a Crystal Report after deployment

    could this be a virtual store issue? do a search for the crdb_adoplus.dll on your c: drive. do you find it somewhere else than the dotnet folder - is it actually in the dotnet folder?

  15. #15

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2010
    Location
    Lake Gaston, NC
    Posts
    453

    Re: Error trying to print a Crystal Report after deployment

    Thanks to everyone for hanging in there with me on this.

    I could NOT find "crdb_adoplus.dll" anywhere on my computer.

    When I did a search for it, I had several folders with this code in them:

    Name:  Capture.jpg
Views: 1708
Size:  31.5 KB

    I'm still at a loss as what to do?

  16. #16
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: Error trying to print a Crystal Report after deployment

    Download the file. Also, you probably should add this to your app.config
    Code:
    <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    </startup>
    Google something like "crdb_adoplus.dll error" and you will find plenty of information. Though I thought this error was fixed with the current version of CR for VS 2010.

  17. #17

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2010
    Location
    Lake Gaston, NC
    Posts
    453

    Re: Error trying to print a Crystal Report after deployment

    The mystery deepens!

    When I did a search for crdb_adoplus.dll no results were found. However when I was snooping thru the SAP files, I found this dll in 2 different places. It was in the win32_x86 folder and another version in the win64_x86 folder in the SAP string shown in the error message as shown below.

    Name:  AdoPlusDllCapture.PNG
Views: 2068
Size:  44.6 KB

    Note: It is not in the dotnet1 folder. I tried putting these files in both the dotnet folder and in a new dotnet1 folder and it still does not work.

    What do I need to do now?

    I am on a 64 bit Win 7 computer and this is in a win32_x86 folder?

  18. #18
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: Error trying to print a Crystal Report after deployment

    Did you update the app.config?

  19. #19

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2010
    Location
    Lake Gaston, NC
    Posts
    453

    Re: Error trying to print a Crystal Report after deployment

    yes. I had this all along. see one of my first posts in this problem.

  20. #20
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: Error trying to print a Crystal Report after deployment

    This is what I have installed

  21. #21
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: Error trying to print a Crystal Report after deployment

    One other thought, is your target cpu set to x86. What .Net Framework are you using?

  22. #22

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2010
    Location
    Lake Gaston, NC
    Posts
    453

    Re: Error trying to print a Crystal Report after deployment

    I have:

    Name:  Capture2.jpg
Views: 1577
Size:  8.1 KB

    using .Net4

    I think you may have found the problem. How do I get the Runtime engine for 32bit? And what do you mean by "is your target cpu set to x86"?

  23. #23
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: Error trying to print a Crystal Report after deployment

    I found it here on my computer C:\\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\Crystal Reports for .NET Framework 4.0

    this link might help http://search.sap.com/ui/notes?id=00...&ssocompatible

    target cpu is set in the project compile->advanced compile option. The same place you set the .Net Framework version.

    If none of this solves your problem there is one other thing you might check. It sounds stupid but I was having problems and they asked if I had a "C:\temp" folder. I did and when I renamed the folder to myTemp the problem went a way. That was several years ago, just a thought.

  24. #24

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2010
    Location
    Lake Gaston, NC
    Posts
    453

    Re: Error trying to print a Crystal Report after deployment

    I don't know what this means or how to do it:?

    Once the packages are downloaded, copy them to the same folder as the product.xml file

  25. #25
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: Error trying to print a Crystal Report after deployment

    If you copy the link into your browser in will download the file. Just copy the download to that folder. Also, you should run the download on your machine so it installs.

  26. #26

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2010
    Location
    Lake Gaston, NC
    Posts
    453

    Re: Error trying to print a Crystal Report after deployment

    I have the 32bit version of CR loaded on my computer and now have the 3 SAP Pgms showing in Control Panel just as you do.

    I have not done: "copy them to the same folder as the product.xml file" because I don't know how or what this means.

    I am getting the same error as I started with as shown below. Remember I don't have a "dotnet1" folder.

    What do you suggest now?

    Name:  Capture3.PNG
Views: 1696
Size:  29.7 KB

  27. #27
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: Error trying to print a Crystal Report after deployment

    I have not done: "copy them to the same folder as the product.xml file" because I don't know how or what this means.
    What don't you understand? You copy the files you downloaded to that folder.

    If the dotnet1 folder doesn't exist, then create it. Make sure the crdb_adoplus.dll is located in the exact location that the error says it can't find it.

  28. #28

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2010
    Location
    Lake Gaston, NC
    Posts
    453

    Re: Error trying to print a Crystal Report after deployment

    I created a dotnet1 folder and copied the crdb_adoplus.dll and related files into it.

    I copied the 2 files (CRRuntime_32bit_13_0_7.msi and CRRuntime_64bit_13_0_7.msi) which I just downloaded into the
    "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\Crystal Reports for .NET Framework 4.0" folder.

    I changed my app.config folder to"

    New Code:
    1. <startup useLegacyV2RuntimeActivationPolicy="true">
    2.           <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
    3.           <supportedRuntime version="v2.0.50727"></supportedRuntime>
    4.         </startup>

    Now I have graduated to the following error:

    Name:  Capture4.PNG
Views: 1985
Size:  25.5 KB

    After research I found this:

    Name:  Capture7.jpg
Views: 1595
Size:  27.1 KB

    My CrystalDecisions.crystalreports.engine.dll is V2.0.50727.

    I have downloaded "CRforVS_13_0_10.exe" which I am assuming is the correct dll to replace V2.0.50727.

    Is this correct and is my next step to install this "CRforVS_13_0_10.exe" on my computer and set a reference to it?

  29. #29
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: Error trying to print a Crystal Report after deployment

    In post #26 you said you have all three files install like my example, I don't see why you would need anything else. I really don't know what your problem is, this site has the best CR experts that I have found. http://scn.sap.com/welcome?original_...ms.sdn.sap.com

    Good luck

  30. #30

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2010
    Location
    Lake Gaston, NC
    Posts
    453

    Re: Error trying to print a Crystal Report after deployment

    Well as they say in Politics, I misspoke. I thought I did but I just noticed there is a difference. I don't have Framework 4. See below:

    Name:  Capture8.jpg
Views: 1585
Size:  9.9 KB

    How do I get Framework 4 as you have?

    All I have in References is Version2.

    Name:  Capture9.PNG
Views: 1674
Size:  44.5 KB
    Last edited by DexterRose; Jul 10th, 2014 at 08:04 PM.

  31. #31

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2010
    Location
    Lake Gaston, NC
    Posts
    453

    Re: [RESOLVED] Error trying to print a Crystal Report after deployment

    Well, SAP had me download and install the latest version of CR, but I still had the same problem.

    This obviously meant I was doing something wrong - ie operator error.

    It turns out the solution to my problem was in the way I had set a shortcut to the exe for my application. If I set the shortcut to where the VB setup put the exe, I had no problem. I had done it a different way which caused the problem.. therefore operator error.

    Thanks to everyone for your help on this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width