Solved

Com Object is not valid or registered

Posted on 2006-11-17
13
402 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

860 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