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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Viewing Crystal Reports (8) within VB 3

Status
Not open for further replies.

marabou

IS-IT--Management
Jan 12, 2001
86
GB
I have a hugely urgent problem

I have written about fifteen different reports, using version 8, which need to be viewed within from a VB program. I am having terrible trouble getting the reports to connect and show the parameter dialog box(the one which gives both discrete and multiple value options for the end user). I think it is a version thing as I never had this problem before the release of version 8.

Firstly, could I check which controls I should be using for calling the reports from within vb 6? Should I be using this web viewer thing, or have I got another option?

Secondly, at the minute I am using the Crystal Report control and for some reason it displays a parameter box for one report and then terminates and for another one it doesn't do anything at all.

I am in desperate need of some help. Could anyone point me to whatever I seemed to have missed?

Thanks in advance
 
I just remembered a design flaw in CR that is probably affecting you. The pdsora7.dll has been renamed to p2sora7.dll. P2xxx means the 32 bit version. Of course the program doesn't distinguish between PDS and P2s when referring to dlls. Try substituting that p2sora7.dll name in your code.

The following links might also shed some light:


Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Don't use any DLLs that start with PD*.DLL. Those are the 16-bit DLLs. Use the P2*.DLLs. Why Crystal continues to show examples with the 16-bit DLLs, I don't know.

Example 1: You can only use this if you built your report with the ADO Data Driver. If you used Visual Linking, stored procedure, etc., don't use it.

Example 2,3: Have never used ...Ex. Didn't even know it existed. I don't think it buys you anything but more possible complications.

I would pull down the Merant Oracle driver. Then do a very simple report using it. One table, 1 field.

Using the Merant driver, the server name CROR8, etc., I got both .LogonServer and .SetLogonInfo to work with my Oracle test db. For .LogonServer I used "p2sodbc.dll".

 
Ken and Balves,

:-D Thanks for all the help! Its finally working properly, here's the code that did it:

Code:
    ' Set the report and connect to the server
    Set report = crxApplication.OpenReport("c:/path/aReport.rpt")
    report.Database.LogOnServer "p2sora7.dll", "myServerOrTNSName", , "myUsername", "myPassword"

    ' Launching the Report Viewer:
    crMyViewer.ReportSource = report
    crMyViewer.ViewReport

Now I'm going to have to do some work... ;-)

Thanks again,
DynamicArray
 
Crystal...

Could you start a new thread in the integration forum? Also, please read the FAQ on what info to include with your question. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top