Click here to Skip to main content
15,947,958 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello everyone!

Hope I'm not crossing any lines or breaking any rules. I need help in publishing my project (vb.net2012 with crystal report). I need A step by step Guide. Please Help, I've done everything I know, and made a deep search but none was effective so far.

Thanks

EDIT:

As asked by Chill, here are the answers to the questions he asked:
1) CR Version - Version 2012 for VB.NET
2) Yes, this is a WinForm application.
3) The current problem I'm having at the moment involves "Load Report Failed"

Quote:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException: Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.
at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
--- End of inner exception stack trace ---
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)
at WindowsApplication1.crpReport.form2_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1080.0 built by: NETFXREL3STAGE
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Cares2.50
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/BPPADMIN/AppData/Local/Apps/2.0/HHE9R5AQ.P6X/01RDTZEW.LBR/care..tion_9ab7722248a0c9aa_0001.0000_581bfd57b8c93ab6/Cares2.50.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 14.6.1038.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1081.0 built by: NETFXREL3STAGE
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1038.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1038.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1078.0 built by: NETFXREL3STAGE
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1038.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1064.2 built by: NETFXREL3STAGE
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1038.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1082.0 built by: NETFXREL3STAGE
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Transactions
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1080.0 built by: NETFXREL3STAGE
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1038.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
CrystalDecisions.ReportSource
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportSource/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportSource.dll
----------------------------------------
CrystalDecisions.CrystalReports.Engine
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.CrystalReports.Engine/13.0.2000.0__692fbea5521e1304/CrystalDecisions.CrystalReports.Engine.dll
----------------------------------------
CrystalDecisions.Shared
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.Shared/13.0.2000.0__692fbea5521e1304/CrystalDecisions.Shared.dll
----------------------------------------
System.Data.DataSetExtensions
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1038.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Data.DataSetExtensions/v4.0_4.0.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll
----------------------------------------
System.Numerics
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1038.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
CrystalDecisions.ReportAppServer.CommLayer
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.CommLayer/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CommLayer.dll
----------------------------------------
CrystalDecisions.ReportAppServer.ClientDoc
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ClientDoc/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ClientDoc.dll
----------------------------------------
CrystalDecisions.ReportAppServer.DataDefModel
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataDefModel.dll
----------------------------------------
CrystalDecisions.ReportAppServer.CubeDefModel
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.CubeDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CubeDefModel.dll
----------------------------------------
CrystalDecisions.ReportAppServer.ReportDefModel
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ReportDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ReportDefModel.dll
----------------------------------------
CrystalDecisions.ReportAppServer.Controllers
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.Controllers/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.Controllers.dll
----------------------------------------
CrystalDecisions.ReportAppServer.DataSetConversion
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataSetConversion/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataSetConversion.dll
----------------------------------------
System.Web
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1073.0 built by: NETFXREL3STAGE
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
log4net
Assembly Version: 1.2.10.0
Win32 Version: 1.2.10.0
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/log4net/1.2.10.0__692fbea5521e1304/log4net.dll
----------------------------------------
CrystalDecisions.Windows.Forms
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.Windows.Forms/13.0.2000.0__692fbea5521e1304/CrystalDecisions.Windows.Forms.dll
----------------------------------------
System.Web.Services
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1038.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Web.Services/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
----------------------------------------
CrystalDecisions.Web
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.Web/13.0.2000.0__692fbea5521e1304/CrystalDecisions.Web.dll
----------------------------------------
CrystalDecisions.ReportAppServer.XmlSerialize
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.XmlSerialize/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.XmlSerialize.dll
----------------------------------------
CustomMarshalers
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1038.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/CustomMarshalers/v4.0_4.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />


When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


4) Deploying on 32-bit Windows 10

What I have tried:

One fix tried was that I've configured the "Copy to Output Directory" option to "Always Copy" but it didn't work.

Here are the codes that I used:


VB
        Dim cryRpt As New ReportDocument
        Dim crConnectionInfo As New ConnectionInfo()
        Dim Name As String
        Dim crtableLogoninfos As New TableLogOnInfos
        Dim crtableLogoninfo As New TableLogOnInfo

        acsconn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=\\Doj2\bpp-doj\dbbppcounter.accdb;Persist Security Info=True;Jet OLEDBatabase Password=*****"
            acsconn.Open()

            strsql = "select * from RHH_CARES where Last_Name='" & Report.tbText.Text & "' and active = '" & 1 & "'"
            acscmd.CommandText = strsql
            acscmd.Connection = acsconn
            acsda.SelectCommand = acscmd
            acsda.Fill(acsds)

            cryRpt.Load(Application.StartupPath & "\carpetas.rpt"
            cryRpt.SetDataSource(acsds.Tables(0))
            CrystalReportViewer1.ReportSource = cryRpt
Posted
Updated 10-Apr-17 17:01pm
v10
Comments
AmIWrong 7-Apr-17 20:53pm    
Anyone please? I'm in a verge of losing my job.
CHill60 10-Apr-17 4:33am    
Now I've formatted your question I can see the "but it didn't work." bit. What specifically "didn't work" - what happened, were there any error messages.
If the article I've supplied does not help then you need to update your question with some details:
- Which version of CR (including any service packs)
- I'm guessing by the (irrelevant) code you have posted that this is a WinForms application? Confirm.
- What is / are the specific problems that you are encountering.
- What platform are you trying to deploy to? (64bit? Win7, 8, 9, 10, other?)

As an aside, your code is open to SQL Injection attacks - NEVER use concatenated strings to generate SQL commands - use Parameterized Queries instead.
AmIWrong 10-Apr-17 5:02am    
What do you mean by parameterized queries? Please kindly teach me. I'm new with crystal report. Thank you.
AmIWrong 10-Apr-17 4:51am    
The codes aren't so irrelevant now that I've finally gotten an answer after putting them in after 3 straight days of waiting! Anyways, thank you for your input! The process given in that article is not anymore applicable in 2012 vb.net, I saw it and tried to copy it, but some of the functions was (I think) removed in vb.net2012. Thank you for noticing my post Good sir. I will update my post with the details you've asked.

1 solution

AmIWrong[^] wrote:
A document processed by the JRC engine cannot be opened in the C++ stack.


I'd suggest to follow these steps:
asp.net - Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack - Stack Overflow[^]
c# - A document processed by the JRC engine cannot be opened in the C++ stack - Stack Overflow[^]

The most common reason of above error is that the programme connot find report file. So, check this line:
C#
cryRpt.Load(Application.StartupPath + "\\carpetas.rpt"


Note:
If you're VB.NET developer, you have to know that:
1) To concatenate 2 strings, you have to use [&] instead of [+].
MSDN wrote:
The [&] operator is recommended for string concatenation because it is defined exclusively for strings and reduces your chances of generating an unintended conversion.

source: Concatenation Operators in Visual Basic[^]

2) To combine two or more strings into path, you have to use Path.Combine Method (System.IO)[^]
In VB.NET you have to use [\] instad of double [\\].

For further details, please see MSDN documentation:
Deploying Windows Applications with Crystal Reports[^]
Deploying Crystal Reports in .NET Applications[^]
 
Share this answer
 
Comments
AmIWrong 10-Apr-17 22:45pm    
Hello and thank you for your input.
I've already tried your suggested solutions earlier on in the build but decided to revert back to the codes of mine that you quoted, as a different solution had a similar format. Nonetheless, thank you for the information, I have updated my codes to include the proper coding.
With regards to this solution, I've come to a dead end on the third step, as I do not see the Setup and Deployments Project option that's mentioned in the article. I am using Visual Studio.NET 2012, and I am guessing that that option has been removed from the version that I use; if I am mistaken, please correct me.
Thanks.
Maciej Los 11-Apr-17 11:18am    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900