I am new to cr10 using vb6 and cr4.6 in the past
vridy gave me a hint but it does not work. Both reports (filtered and unfiltered) are the same. they differ using cr4.6. Any hint to solve my problem?
My program:
Dim Titel As String, Mldg As String, Stil As String, Antwort As String
Dim crApplication As CRAXDRT.Application
Dim crReport As CRAXDRT.Report
frmBerichte.Show
frmBerichte.AbsBlJListeAbfrage 'sql question is store in access.mdb
Unload frmBerichte
Set crApplication = New CRAXDRT.Application
Set crReport = crApplication.OpenReport(App.Path & "\Berichte10\AbsBlJListe.rpt", 1)
Titel = "Abschreibung nach Bilanzjahren"
Mldg = "Soll nur das Bilanzjahr gedruckt werden?"
Stil = vbYesNo + vbQuestion + vbDefaultButton1
Antwort = MsgBox(Mldg, Stil, Titel) ' Meldung anzeigen.
If Antwort = vbYes Then
crReport.RecordSelectionFormula = "{AbsListe.BlJ} = '" & Bilanzjahr & "' "
End If
CRViewer1.ReportSource = crReport
CRViewer1.ViewReport
vridy gave me a hint but it does not work. Both reports (filtered and unfiltered) are the same. they differ using cr4.6. Any hint to solve my problem?
My program:
Dim Titel As String, Mldg As String, Stil As String, Antwort As String
Dim crApplication As CRAXDRT.Application
Dim crReport As CRAXDRT.Report
frmBerichte.Show
frmBerichte.AbsBlJListeAbfrage 'sql question is store in access.mdb
Unload frmBerichte
Set crApplication = New CRAXDRT.Application
Set crReport = crApplication.OpenReport(App.Path & "\Berichte10\AbsBlJListe.rpt", 1)
Titel = "Abschreibung nach Bilanzjahren"
Mldg = "Soll nur das Bilanzjahr gedruckt werden?"
Stil = vbYesNo + vbQuestion + vbDefaultButton1
Antwort = MsgBox(Mldg, Stil, Titel) ' Meldung anzeigen.
If Antwort = vbYes Then
crReport.RecordSelectionFormula = "{AbsListe.BlJ} = '" & Bilanzjahr & "' "
End If
CRViewer1.ReportSource = crReport
CRViewer1.ViewReport