|
-
Dec 29th, 2005, 02:37 AM
#1
Thread Starter
New Member
Connect CR 8.5 To SQL Server
Hi ! rajan,
Could u please tell me how to connect to crystal report 8.5 to sql server from visual basic 6.0.
Last edited by Hack; Dec 29th, 2005 at 11:12 AM.
-
Dec 29th, 2005, 11:09 AM
#2
PowerPoster
Re: how to call external crystal reports xi in vb6
This is how I connect CR9 to SQL Server 2000:
VB Code:
Dim PRINTREPLY As VbMsgBoxResult
PRINTREPLY = MsgBox("Print to screen?", vbYesNo)
If PRINTREPLY = vbNo Then
glbPrinterDestination = 1
' CommonDialog1.ShowPrinter
Else
glbPrinterDestination = 0
End If
--The above code sets a flag for either printing or using the viewer
Set Report = crxApplication.OpenReport("Z:\DAD\MachineUsage.rpt", 1)
For Each crxDatabaseTable In Report.Database.Tables
crxDatabaseTable.ConnectionProperties("user id") = "sa"
crxDatabaseTable.ConnectionProperties("Password") = myPasswordTechniSQL
Next crxDatabaseTable
Report.PaperOrientation = crDefaultPaperOrientation
If glbPrinterDestination = 0 Then
glbReportForm = "frmProduction"
CRViewer.Show 1
Else
Report.PrintOut False
End If
Edit: Fixed [vbcode][/vbcode] tags. - Hack
Last edited by Hack; Dec 29th, 2005 at 11:13 AM.
-
Dec 29th, 2005, 11:16 AM
#3
Re: Connect CR 8.5 To SQL Server
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
|