cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Report VB.net Application - Client PC Issues

0 Kudos

Hi,

I created my second Crystal Reports application and I am having issues getting it to work on a clients PC. Based on what I learned from my first application, I know that I needed to install the runtime on the clients PC, which I did. When I run the app, nothing happens. No exception is thrown or anything. I see the mouse wait cursor come up (the spinning windows cursor) for about 5 seconds and then nothing happens. The odd thing is that I am able to run the code from my PC just fine when I use the msi setup file I created. I have no idea where to look to figure this out... Any help would be appreciated.

Thanks,

Chris Kretman

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

I resolved this on my own by moving from excel as a data source in my report. I created a new table in sql server instead.

Thank you for all of the help and time on this issue.

Answers (11)

Answers (11)

0 Kudos

Hi Chris,

FYI - MS Excel as a data source should have an ODBC connection to it, to run in 64 bit mode you would need the 64 bit Excel dll's, which you can get from 64 bit version of Microsoft Office.

Converting to a real DB is even better...

Thanks again

Don

0 Kudos

Thanks for sharing your knowledge with the community. While searching the internet to try and find an answer I saw your posts on various sites.

0 Kudos

Hi Don,

I changed my app back to use any CPU and the error is now resolved. I believe it is because I am using an excel file, excel 8.0 datasource, as one of my tables in a subreport. If you see the screenshot it prompts me for logon information to the excel file, which requires none. I included a snippet of code and I don't know what to put for the logon information for an excel file that doesn't require any?

   'fill the subreport data tables
            For Each subrep As ReportDocument In rpt.Subreports
                For Each table As Table In subrep.Database.Tables
                    If table.Name <> "Sheet1_" Then
                        table.LogOnInfo.ConnectionInfo = ConnectionInfo
                        table.ApplyLogOnInfo(table.LogOnInfo)
                    Else




                        'What do i code here to connect to an excel datasource table that has no logon information?


                    End If
                Next
            Next
0 Kudos

Hi Chris,

Check their Virus software and add your EXE and all CR folders to the trusted list:

C:\Program Files (x86)\SAP BusinessObjects

Also the Users \Temp folder may need to be added to the trusted list, when opening a report CR makes a copy of the report and saves it into the \Temp folder.

Error in Database can either mean the DB Client is not installed or it's not matching your app platform, X86 requires a 32 bit client and X64 requires the 64 bit Client to be installed.

Don

0 Kudos

Hi,

I rebuilt my app yesterday and copied the code over. I am targeting the 64 bit cpu, using a 64 bit installer and using the 64 bit runtime. I believe this other issue has been solved. In my new app I am now seeing this error when trying to print. Also seeing the error in the picture when showing the viewer.

There was an error Processing PickSlipPrint. Error: CrystalDecisions.CrystalReports.Engine.DataSourceException: Error in File OM_Picking_Slip - Copy 17844_21380_{4EC228C2-7902-4EE2-AD41-6C510DED6447}.rpt:

Failed to load database information. ---> System.Runtime.InteropServices.COMException: Error in File OM_Picking_Slip - Copy 17844_21380_{4EC228C2-7902-4EE2-AD41-6C510DED6447}.rpt:

Failed to load database information.
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.GetLastPageNumber(RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.GetLastPageNumber(ReportPageRequestContext reqContext)
--- End of inner exception stack trace ---
at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
at CrystalDecisions.ReportSource.EromReportSourceBase.HandleException(Exception exception)
at CrystalDecisions.ReportSource.EromReportSourceBase.GetLastPageNumber(ReportPageRequestContext reqContext)
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 PickSlipPrint.Form1.Form1_Load(Object sender, EventArgs e) in C:\Users\chris.kretman\source\repos\PickSlipPrint\PickSlipPrint\Form1.vb:line 134

Also seeing the error in the picture when showing the viewer

0 Kudos

I switched everything to 64 bit and I am still seeing Error # 2 above. When I install the app on my PC it works just fine, but I had just assumed that was because I have the SDK for VS installed on my pc. I've never added a c++ runtime to app dependencies before, do you know what steps to take to do that?

0 Kudos

CRforVS13SP29 is the version I am using.

In have done a lot of brainstorming on this issue and I believe I changed the app to run as a x86 version, which if I'm not mistaken is the 32 bit version. I'm going to test changing the app to a 64 bit version and using the 64 bit version of the runtime like I did with my last app. I'm hoping this resolves the issue. I will let you know.

Thanks,

Chris

0 Kudos

What version of CR for VS are you using?

Are you distributing the same version to the client PC?

Likely missing a dependency like the VC 2015 C++ runtime or one of MS's dataSet dll's.

CR runtime platform is for your app platform not the OS platform.

Don

0 Kudos

Ok, so now I can get the code to work on the client PC but I am still seeing the same error that I see on our server when it is run there. To solve the initial issue, I needed to install the 32 bit version rather than the 62 bit version of the runtime. That being said, I am still seeing this error, where the code is failing on the last line provided:

 'connect the viewer to the data tables
            If CrystalReportViewer2.LogOnInfo IsNot Nothing Then
            Dim tlInfo As TableLogOnInfos = CrystalReportViewer2.LogOnInfo
            For Each tbloginfo As TableLogOnInfo In tlInfo
                tbloginfo.ConnectionInfo = ConnectionInfo
            Next
        End If






            'fill the subreport data tables
            For Each subrep As ReportDocument In rpt.Subreports
                For Each table As Table In subrep.Database.Tables
                    If table.Name <> "Sheet1_" Then
                        table.LogOnInfo.ConnectionInfo = ConnectionInfo
                        table.ApplyLogOnInfo(table.LogOnInfo)
                    End If
                Next
            Next






            'Update the data on the report
            rpt.VerifyDatabase()
            rpt.Refresh()

There was an error Processing PickSlipPrint. Error: System.InvalidCastException: Unable to cast COM object of type 'CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass' to interface type 'CrystalDecisions.ReportAppServer.Controllers.ISCRReportSource'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{31E7715A-8AD0-4D1C-958E-C1BE0A6F2D0C}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)

at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Refresh()
at CrystalDecisions.ReportSource.EromReportSourceBase.Refresh(RequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.Refresh(RequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Refresh()
at CrystalReportsApplication1.Form1.CrystalReportViewer1_Load(Object sender, EventArgs e) in C:\Users\chris.kretman\source\repos\CrystalReportsApplication1\CrystalReportsApplication1\Form1.vb:line 105

0 Kudos

I went through the event viewer on the client PC and found two critical errors, which is concerning because I have all of my code inside a try catch block and when it throws an exception it should be emailing me.

The Error messages are below. I understand the System.IO.FileNotFoundException, but not Error #1.

Error #1:

Faulting application name: CrystalReportsApplication1.exe, version: 1.0.0.0, time stamp: 0x5f89b138

Faulting module name: KERNELBASE.dll, version: 10.0.19041.572, time stamp: 0x979ddb1d

Exception code: 0xe0434352

Fault offset: 0x00129ab2

Faulting process id: 0x524c

Faulting application start time: 0x01d6a3ce8070d14a

Faulting application path: C:\Program Files (x86)\Kage Innovation\PickSlipPrintSetup\CrystalReportsApplication1.exe

Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll

Report Id: 82515458-4bfb-4485-b849-5a9ae284102e

Error #2:

Faulting package full name:

Faulting package-relative application ID:

Application: CrystalReportsApplication1.exe

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: System.IO.FileNotFoundException

at CrystalDecisions.Shared.SharedUtils..cctor()

Exception Info: System.TypeInitializationException

at CrystalDecisions.Shared.SharedUtils.get_CurrentControl()

at CrystalDecisions.Shared.SharedUtils.GetEffectiveCulture()

at CrystalDecisions.Shared.LocaleManager..ctor()

at CrystalDecisions.Windows.Forms.CrystalReportViewer.InitReportViewer()

at CrystalDecisions.Windows.Forms.CrystalReportViewer..ctor()

at CrystalReportsApplication1.Form1.InitializeComponent()

at CrystalReportsApplication1.Form1..ctor()

Exception Info: System.InvalidOperationException

at CrystalReportsApplication1.My.MyProject+MyForms.Create__Instance__[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.__Canon)

at CrystalReportsApplication1.My.MyProject+MyForms.get_Form1()

at CrystalReportsApplication1.My.MyApplication.OnCreateMainForm()

at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()

at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()

at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])

at CrystalReportsApplication1.My.MyApplication.Main(System.String[])

0 Kudos

Yes it was installed with admistrator rights. It doesn't do any logging, I only have error handling in it. Instead of running on the client PC I attempted to run it on our server where my first Crystal report application is running. That did kick off the error handling and sent me an email with the error details. please see below. I have also posted some of my code, the last line being 105, which the error references.

     'connect the viewer to the data tables
            If CrystalReportViewer2.LogOnInfo IsNot Nothing Then
            Dim tlInfo As TableLogOnInfos = CrystalReportViewer2.LogOnInfo
            For Each tbloginfo As TableLogOnInfo In tlInfo
                tbloginfo.ConnectionInfo = ConnectionInfo
            Next
        End If






            'fill the subreport data tables
            For Each subrep As ReportDocument In rpt.Subreports
                For Each table As Table In subrep.Database.Tables
                    If table.Name <> "Sheet1_" Then
                        table.LogOnInfo.ConnectionInfo = ConnectionInfo
                        table.ApplyLogOnInfo(table.LogOnInfo)
                    End If
                Next
            Next






            'Update the data on the report
            rpt.VerifyDatabase()
            rpt.Refresh()

There was an error Processing PickSlipPrint. Error: System.InvalidCastException: Unable to cast COM object of type 'CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass' to interface type 'CrystalDecisions.ReportAppServer.Controllers.ISCRReportSource'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{31E7715A-8AD0-4D1C-958E-C1BE0A6F2D0C}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)

at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Refresh()
at CrystalDecisions.ReportSource.EromReportSourceBase.Refresh(RequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.Refresh(RequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Refresh()
at CrystalReportsApplication1.Form1.CrystalReportViewer1_Load(Object sender, EventArgs e) in C:\Users\chris.kretman\source\repos\CrystalReportsApplication1\CrystalReportsApplication1\Form1.vb:line 105

DellSC
Active Contributor
0 Kudos

When you installed the .msi on the client machine, were you logged in with Administrator rights? Also, does your app do any logging that might help you diagnose the issue?

-Dell