Link to home
Start Free TrialLog in
Avatar of Majusri
Majusri

asked on

VB .net with Crystal Report 9

Hello,
   
      please help, I'm trying to bind crystal report in my vb.net application, so when I go to the window forms and select Crystal Report viewer control it default name is AxCRViewer1 instead of CrystalReportViewer1 and somehow the reportsource property is disable therefore I cannot bind my report. One more thing, in the add new item window I do not see crystal report icon in the templates section. Would anyone know what is going on. I am really appreciate any help here.

Thank you,
Manj
Avatar of frodoman
frodoman
Flag of United States of America image

Sounds like you're building a web form instead of a windows form...
Avatar of EBatista
EBatista

in the property windows what kind of control is it?
its class name has to be:
CrystalDecisions.Windows.Forms.CrystalReportViewer
Avatar of Majusri

ASKER

not really, I'm just trying to do a simple report with vb.net window form. I have an existing report and create a form in vb.net with a Crystal Report Viewer Control on the form. I noticed that the default name is AxCRViewer1 instead on CrystalReportViewer1 and the reportsource in the property is disable. So I added this code in the form load AxCRViewer1.reportSource = "Report1.rpt" it then compile but it have a runtime error. I'm just don't know what is wrong, The Crystal Report templates is also not exist in the Add new Item dialog box
Avatar of Majusri

ASKER

this is the error
An unhandled exception of type 'System.InvalidCastException' occurred in axinterop.crviewerlib.dll

Additional information: No such interface supported
Avatar of Majusri

ASKER

the control name in the property window is AxCRViewer1 AxCRViewerLib.AxCRViewer
the window forms control is called Crystal Report Viewer Control
I think when you added to control to your toolbox, you added the ActiveX (COM) control instead of the .Net Framework Component control.  Try adding the .Net control and see if that solves your problem.
Avatar of Majusri

ASKER

You are right, the control are coming from COMPONENT Control and it is Active X(COM), over the .Net control I cannot find Crystal Report viewer control at all. How can I get it?
Do you have to full version of Visual Studio are is this a demo / beta version?  On the full version it should be there already - you may have to reinstall and make sure you didn't deselect this option...

Avatar of Majusri

ASKER

hmm I have the VB.net full version and I didn't deselect any option at all
Avatar of Majusri

ASKER

only the active X Crystal Report is included, is there a way that I can download from somewhere
Avatar of Majusri

ASKER

by the way, this is Visual Basic .net standard 2003
Go to Help -> About MS VB .Net ...

In the list of Installed Products, you should see an entry "Crystal Reports for Visual Studio .NET". If this entry is not there, then CR components were not installed. You may have to run the installation program again and make sure that those components are installed.
Try the installation again - maybe something was corrupted or didn't register correctly?  You should have the .Net component...
Avatar of Majusri

ASKER

I did go to Help -> About MS VB.Net but there is no where have the list of Installed Product but just Visual Basic.net installed. I did the installation again but no luck, .Net Component does not have Crystal Report Viewer. I'm not sure maybe Visual Basic .net 2003 is limited with Crystal Report Viewer control.
ASKER CERTIFIED SOLUTION
Avatar of frodoman
frodoman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am getting the same error and I am using the Enterprise Developer edition. Is the same thing true for this version? I also have Crystal 9 Developer addition.

Thanks,
-Tim