Solved

Com Object is not valid or registered

Posted on 2006-11-17
13
396 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
 

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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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 gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now