Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Crystal Reports 10.0 report using VB 6.0

Status
Not open for further replies.

css1015

Programmer
Oct 29, 2003
20
0
0
US
Hi,

I am totally new to Crystal Reports 10.0 from the programming point of view. Crystal Reports 8.5 used to provide a Crystal Report control that I could place on my VB 6.0 form and launch the 8.5 report from within VB 6.0.

But with Crystal Reports 10.0, that control is not available. I am not sure which component or control I need to use to assign properties to in my VB 6.0 code. I am sure someone has accomplished this before, if they can provide details of the control/component and what the code for assigning properties to it are, I would greatly appreciate it.

Thanks a bunch in advance.

Chad
 
I responded to your other post: thread766-1027511.

-dave
 
Hi Vidru,

Thanks for your response.

I have the following code written:

Public crxApplication As New CRAXDRT.Application
Public Report As CRAXDRT.Report

Dim crxDBTable As CRAXDRT.DatabaseTable
Set Report = crxApplication.OpenReport(strCommonPath, 1)

where strCommonPath is the concatenation of App.Path and the report file name.

For Each crxDBTable In Report.Database.Tables
Report.Database.Tables.Item(1).SetLogOnInfo????
Next

The reason I have specified ???? is because I am looking for that method but I do not find it. I know that is the way I can set my log in properties, what reference am I missing?

The two references I have in my VB project are:

i) Crystal Report Viewer Control 9 and
ii) Crystal Reports ActiveX Runtime Designer Library 10

Also, if I need to use about 10 reports, all with the same connection, I realized I can set it at the crxApplication level like:

crxApplication.LogOnServer "p2sodbc.dll", "Server", "SampleDB", "sa", "sa"

But I do not have p2sodbc.dll on my machine. I installed Crystal Reports v10 OEM edition that came with Microsoft Business Solutions software named Great Plains.

I NEED TO EITHER GET SETLOGONINFO METHOD TO APPEAR OR KNOW IF I CAN USE AN ALTERNATE DLL FOR THE LOGONSERVER METHOD. PLEASE HELP.

Thanks again.

Chad Sriram
 
That did it!!! The connnectionproperties bag worked just right for me, now I can open my report that I have created. Thanks a lot, Dave.

If I need to install this VB app, do I just let the Package and Deployment wizard run and let it suggest all the needed files or do I have to keep anything else in mind?

Chad Sriram
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top