Solved

Com Object is not valid or registered

Posted on 2006-11-17
13
401 Views
Last Modified: 2012-08-14
Hi.

I have CRXI and I made my reports using that.  On my .NET 2003 development machine, i select "CrystalReportsViewer" and then view my report.  It works fine.  This is using the 9.0 CR Viewer.

When I load on a client machine I get "Com Object not valid or registered" - not when i open the form with the viewer but when i try to load a report.

i figured my install set wasn't complete... so i went ahead and tried a few times, then just installed CRXI as a test on the test machine & guess what?  Same error....

So I figured my report must be wrong, and imported it into VB.NET instead of opening it as a file, and i get the same error.

When I open the report in CRXI on the test machine it works fine.

So I figured I didn't have the 9.msm files correct, but i DL'ed those and installed them too... and no luck...

Any ideas?
0
Comment
Question by:enari
  • 7
  • 6
13 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 17970550
You need to include the CR XI merge modules with the install.

mlmcc
0
 

Author Comment

by:enari
ID: 17983742
I used the CRXI merge modules in my first attempt!
then i added in CR 9 merge modules too... same error
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 17983901
Why are you using the CR9 viewer and not the CRXI viewer?

mlmcc
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:enari
ID: 17991302
I get an error message saying...

One of the types in the assembly unable to load

when i try to put the CRXI ActiveX viewer in my VB program.
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 400 total points
ID: 17992042
0
 

Author Comment

by:enari
ID: 18021302
http://www.thescripts.com/forum/thread113223.html

Blow away the C:\Documents and Settings\$username$\Application
Data\Microsoft\VisualStudio\7.1 directory
and restart VS.NET 2003.


And NOW I have CRXI viewer!!!


Let me test the redistribuatbles!!!
0
 

Author Comment

by:enari
ID: 18021573
Ok... now my code doesn't work...

Me.crviewer.ReportSource = "All.rpt"
me.crviewer.show

When I do the first line,

An unhandled exception of type 'System.InvalidCastException' occurred in axinterop.crystalactivexreportviewerlib11.dll

Additional information: No such interface supported


How should i set it up?
0
 

Author Comment

by:enari
ID: 18021659
       Dim crReportDocument As New ReportDocument
        crReportDocument.Load("all.rpt")
        crviewer.ReportSource = crReportDocument
        Me.crviewer.Show()


Gives me the same error
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 18022454
Where is the report document?  I generally pased the full path.

mlmcc
0
 

Author Comment

by:enari
ID: 18031620

        Dim path As String
        path = System.AppDomain.CurrentDomain.BaseDirectory() & "all.rpt"
        Dim crReportDocument As New ReportDocument
        crReportDocument.Load(path)
        crviewer.ReportSource = crReportDocument
        Me.crviewer.Show()

So I pass in the full path... same error... i am getting very fustraited.

I also tried importing the report into VB and then

dim rpt as new crAll
crviewer.reportsource=rpt
crviewer.show

and i still get the same error!
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 400 total points
ID: 18032531
Here is the basic code I use.  It is VB but should be similar to ,Net

Option Explicit
    Private crApp As CRAXDRT.Application
    Private crRpt As CRAXDRT.Report

On Error GoTo errHandler

'
'   Check if report is already in use
'
    If IsObject(crRpt) Then
       Set crRpt = Nothing
    End If

'
'   Open report
'
    Set crApp = New CRAXDRT.Application

    Set crRpt = crApp.OpenReport("Full Path to report.rpt, 1)


'
' Set the viewer's report source to the Report object
'
    Me.rptCRViewer.ReportSource = crRpt
    Me.rptCRViewer.ViewReport
    Me.Show

mlmcc
0
 

Author Comment

by:enari
ID: 18038955
That worked, Thank you very much!!!  I really appreciate your help!
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 18039719
Glad i could help

mlmcc
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question