|
-
Dec 2nd, 2004, 01:17 PM
#1
Thread Starter
Fanatic Member
Crystal Reports 10.0 in VB6?
I have Crystal Reports Professional 10.0. Shouldn't I have the designers in VB6 available? They are there. Is CR10 not compatible for VB6 developers?
-
Dec 2nd, 2004, 01:39 PM
#2
Thread Starter
Fanatic Member
I see that this wuestion has been asked before
However there are no reponses to any of those questions. Should I infer that Crystal Reports 10 isn't compatible with VB6 or that nobody in vb forums knows anything about Crystal Reports 10?
-
Dec 2nd, 2004, 01:54 PM
#3
PowerPoster
I will be going to CR10 in the 1st quarter. I assume that it works. I haven't heard otherwise. I'm not sure what you mean by the "designers". I design my reports in CR and then invoke them in VB code.
-
Dec 2nd, 2004, 01:59 PM
#4
Thread Starter
Fanatic Member
in 8.5
You could desing the Crystal Report in VB6 Studio with the wizard or from an existing report. However in 10.0 as I have it There are no tools for VB6 Developers. I can bring in the ActiveX Report Viewer into my project but I can not change anything with the design graphically. I haven't even been able to connect to an existing report.
I need to get Crystal Reports 8.5 I think....any ideas?
-
Dec 2nd, 2004, 02:08 PM
#5
PowerPoster
Crystal changed a bunch (in how to use it in VB) with 8.5 or 9.0 , I can't remember.
In 9.0 you need this in your general declarations (of the form)
Dim crxApplication As New CRAXDRT.Application
Public Report As CRAXDRT.Report
Dim crxDatabaseTable As CRAXDRT.DatabaseTable
Then, when I invoke the report:
Set Report = crxApplication.OpenReport("Z:\DAD\DailyProductionQuickSummary.rpt", 1)
For Each crxDatabaseTable In Report.Database.Tables
crxDatabaseTable.ConnectionProperties("user id") = "sa"
crxDatabaseTable.ConnectionProperties("Password") = myPasswordTechniSQL
Next crxDatabaseTable
Report.SelectPrinter glbPrinterDriver, glbPrinterName, glbPrinterPort
Report.PaperOrientation = crDefaultPaperOrientation
If glbPrinterDestination = 0 Then 'to screen
glbReportForm = "frmProduction"
CRViewer.Show vbModal
Else
Report.PrintOut False
End If
-
Dec 2nd, 2004, 02:19 PM
#6
Thread Starter
Fanatic Member
how about for Crystal 10
How do I get this working for Crystal Reports 10. There is no CRAXDRT available.
-
Dec 2nd, 2004, 02:38 PM
#7
PowerPoster
Again, I am not planning to go to 10 until late 1st quarter. I guess i will figure it out then.
-
Dec 2nd, 2004, 03:08 PM
#8
Addicted Member
If you have Crystal Reports Developer 10 then you can create your reports right in VB6. These reports are enbedded into your project. Under the projects menu you will find the: Add Cryatal Reports 10 Wizard. If you have Crystal Reports Professional 10 then you can't design your reports in the VB6 IDE.
-
Dec 2nd, 2004, 03:24 PM
#9
Thread Starter
Fanatic Member
Thanks anyways
At least this post got some response
-
Dec 2nd, 2004, 03:25 PM
#10
Thread Starter
Fanatic Member
purdybirds
I have Pro...guess that is no good. Thanks!
-
Dec 7th, 2004, 07:11 PM
#11
Thread Starter
Fanatic Member
Re: Crystal Reports 10.0 in VB6?
I now have Crystal Reports Developer 10. I am testing my code now and I am getting an error when my Report tries to access the database for the report. My database is Access and password protected. This used to work fine for 8.5 but my method must be incorrect now or Crystal Reports 10 doesnt support DAO.
Any help:
here is my code behind the form
Code:
Dim Report As New CR10ClientBirthday
Private Sub Form_Load()
On Error GoTo MyErrorTrap:
Me.WindowState = vbMaximized
' Add the datasource to the report
Set Report = Nothing
Set Report = New CR10ClientBirthday
'sets the database password enabling the report to connect
Report.Database.Tables(1).SetSessionInfo "", Chr(10) & HSODBpswrd
'Sets the location for the first table in the report to the Access database. If the report has
'more than one table the same location will propagate through all of the tables.
'You can set a new location for each table individually based on it's index in the Tables collection.
Report.Database.Tables(1).Location = HSO_DB_PATH_AND_NAME
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
Exit Sub
MyErrorTrap:
MsgBox Err.Description, vbOKOnly
End Sub
Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set Report = Nothing
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|