Click here to Skip to main content
15,887,214 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Connection String Hash Pin
911911099-Apr-17 21:22
911911099-Apr-17 21:22 
GeneralRe: Connection String Hash Pin
Richard MacCutchan9-Apr-17 21:46
mveRichard MacCutchan9-Apr-17 21:46 
GeneralRe: Connection String Hash Pin
911911099-Apr-17 21:55
911911099-Apr-17 21:55 
GeneralRe: Connection String Hash Pin
Richard MacCutchan9-Apr-17 22:10
mveRichard MacCutchan9-Apr-17 22:10 
GeneralRe: Connection String Hash Pin
Dave Kreskowiak10-Apr-17 2:43
mveDave Kreskowiak10-Apr-17 2:43 
Questionvb.net report card generation Pin
Member 131142067-Apr-17 19:38
Member 131142067-Apr-17 19:38 
AnswerRe: vb.net report card generation Pin
Richard MacCutchan7-Apr-17 21:34
mveRichard MacCutchan7-Apr-17 21:34 
Questionvb6 crystal report- subreport Pin
hoomi_ghost7-Apr-17 4:17
hoomi_ghost7-Apr-17 4:17 
how create subreport with crystalReports in vb6 and access db=?
in my code i have error logon failed
please help me ,thanks

my code:

Private Sub lvButtons_H6_Click()

Dim Rs As New ADODB.Recordset

If Rs.State = 1 Then Rs.Close

' If Rs.State = 1 Then Rs.Close

If StrSQL = "" Then

Rs.Open "SELECT ID,GroupName,Fname,LName FROM tblMain ORDER BY ID ASC", Conn, adOpenStatic, adLockOptimistic

Else
On Error Resume Next
Rs.Open StrSQL, Conn, adOpenStatic, adLockOptimistic

End If

StrSQLPrint = Rs.Source
Set Me.VS.DataSource = Rs
PrintMember StrSQLPrint
End Sub

Private Sub PrintMember(StrSQL As String)
'On Error GoTo E_R



Dim Rs As New ADODB.Recordset
'Dim ObjApp As New CRAXDRT.Application
'Dim ObjRpt As New CRAXDRT.report
'Dim crDBTab As CRAXDRT.DatabaseTable

If Rs.State = 1 Then Rs.Close
'MsgBox StrSQL, vbCritical
Rs.Open StrSQL, Conn

Dim CrxApp As CRAXDRT.Application
Dim CrxRep As CRAXDRT.report
Dim crxSubreport As CRAXDRT.report
Dim crxSubreportObject As SubreportObject
Dim crxDatabase As CRAXDRT.Database
Dim crxDatabaseTables As CRAXDRT.DatabaseTables
Dim crxDatabaseTable As CRAXDRT.DatabaseTable
Dim crxSections As CRAXDRT.Sections
Dim crxSection As CRAXDRT.Section
Dim CRXReportObject As Object

Set CrxApp = New CRAXDRT.Application
Set CrxRep = CrxApp.OpenReport(App.Path & "\Reports\R.rpt")
CrxRep.Database.SetDataSource Rs

Set crxSections = CrxRep.Sections

For Each crxSection In crxSections
For Each CRXReportObject In crxSection.ReportObjects
If CRXReportObject.Kind = crSubreportObject Then
Set crxSubreportObject = CRXReportObject
Set crxSubreport = crxSubreportObject.OpenSubreport
Set crxDatabase = crxSubreport.Database
Set crxDatabaseTables = crxDatabase.Tables

For Each crxDatabaseTable In crxDatabaseTables

crxDatabaseTable.Location = App.Path & "\Database.mdb"


crxDatabaseTable.SetLogOnInfo "Local", "Database.mdb", "Admin", "123456"
Next

Set crxSubreport = Nothing
End If
Next
Next

Frm_Preview.CR.ReportSource = CrxRep
Frm_Preview.CR.ViewReport
Frm_Preview.Show vbModeless, MainForm

Set crxDatabase = Nothing
Set crxDatabaseTable = Nothing
Set crxDatabaseTables = Nothing
Set crxSections = Nothing
Set crxSection = Nothing
Set crxSubreportObject = Nothing
Set crxReport = Nothing
Set crxApplication = Nothing
End sub

modified 7-Apr-17 19:09pm.

AnswerRe: vb6 crystal report- subreport Pin
Richard Deeming7-Apr-17 4:22
mveRichard Deeming7-Apr-17 4:22 
GeneralRe: vb6 crystal report- subreport Pin
hoomi_ghost7-Apr-17 13:15
hoomi_ghost7-Apr-17 13:15 
AnswerRe: vb6 crystal report- subreport Pin
CHill607-Apr-17 4:57
mveCHill607-Apr-17 4:57 
AnswerRe: vb6 crystal report- subreport Pin
Dave Kreskowiak7-Apr-17 8:22
mveDave Kreskowiak7-Apr-17 8:22 
Questionsort element of sting in alphabetically order Pin
Member 131073484-Apr-17 23:28
Member 131073484-Apr-17 23:28 
SuggestionRe: sort element of sting in alphabetically order Pin
Jochen Arndt5-Apr-17 0:12
professionalJochen Arndt5-Apr-17 0:12 
GeneralRe: sort element of sting in alphabetically order Pin
Member 131073485-Apr-17 0:46
Member 131073485-Apr-17 0:46 
GeneralRe: sort element of sting in alphabetically order Pin
Jochen Arndt5-Apr-17 0:54
professionalJochen Arndt5-Apr-17 0:54 
GeneralRe: sort element of sting in alphabetically order Pin
Member 131073485-Apr-17 0:59
Member 131073485-Apr-17 0:59 
QuestionHow to subtract in VB with Access DB Pin
Landon Asis30-Mar-17 6:31
Landon Asis30-Mar-17 6:31 
SuggestionRe: How to subtract in VB with Access DB Pin
Richard Deeming30-Mar-17 7:09
mveRichard Deeming30-Mar-17 7:09 
AnswerRe: How to subtract in VB with Access DB Pin
Michael_Davies30-Mar-17 8:49
Michael_Davies30-Mar-17 8:49 
Questionreference required to assembly.. Pin
Member 1103130430-Mar-17 1:39
Member 1103130430-Mar-17 1:39 
AnswerRe: reference required to assembly.. Pin
Eddy Vluggen2-Apr-17 0:46
professionalEddy Vluggen2-Apr-17 0:46 
QuestionObject reference not set to an instance of an object. Pin
Member 1103130429-Mar-17 23:56
Member 1103130429-Mar-17 23:56 
AnswerRe: Object reference not set to an instance of an object. Pin
Ralf Meier30-Mar-17 0:07
mveRalf Meier30-Mar-17 0:07 
GeneralRe: Object reference not set to an instance of an object. Pin
Member 1103130430-Mar-17 0:28
Member 1103130430-Mar-17 0:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.