by Fra (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 29th January 2002
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
How to open a Crystal Report using the Crystal Report Control! Comments in italian.
' OpenCrystalReport
Private Sub OpenCrystalReport(ReportFileName As String)
Dim lSubRepNum As Long
Dim strSubRepName As String
Dim lCount As Long
' Imposta il file del report
CrystalReport1.ReportFileName = ReportFileName
' Stringa di connessione
CrystalReport1.Connect = "DSN=xxx;UID=xxx;PWD=xxx;"
' Preleva la Query SQL direttamente dal Crystal
CrystalReport1.RetrieveSQLQuery
' Ci sono n sottoreport
lSubRepNum = CrystalReport1.GetNSubreports
' Per ogni sottoreport
For lCount = 0 To lSubRepNum - 1
' Prende il nome del sottoreport
strSubRepName = CrystalReport1.GetNthSubreportName(lCount)
' Le proprietà che successivamente verranno
' impostate riguarderanno il sottoreport indicato
CrystalReport1.SubreportToChange = strSubRepName
' Stringa di connessione del sottoreport
CrystalReport1.Connect = "DSN=xxx;UID=xxx;PWD=xxx;"
Next lCount
' Le proprietà ora tornano al report principale
CrystalReport1.SubreportToChange = ""
' Avvio!
CrystalReport1.Action = 1
End Sub
No comments have been posted about How to open a Crystal Report using the Crystal Report Control! Comments in italian.. Why not be the first to post a comment about How to open a Crystal Report using the Crystal Report Control! Comments in italian..