Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Report Viewer not showing all records

Status
Not open for further replies.

rpk2006

Technical User
Apr 24, 2002
225
IN
I am using following code to display records in CRViewer.
But how to add more pages to the CRViewer as the record pointer moves
to the next record.

Code:
Private Sub Form_Load()
    Dim tot, i, t

Screen.MousePointer = vbHourglass
'Set Report = CApp.OpenReport(App.Path & "\reports\Cryspermit_Recordset.rpt")
Set rsReport = New ADODB.Recordset
Set Report = New CrystalReport1_Recordset2

If rsReport.State = adStateClosed Then
    rsReport.Open "Select * from PermitReport", CN, adOpenKeyset, adLockReadOnly
End If

Report.Database.AddADOCommand rsReport.ActiveConnection, rsReport.ActiveCommand
    tot = rsReport.RecordCount
CRViewer1.ReportSource = Report
    
    For i = 1 To tot
        With Report
            .txtPermitNo.SetText rsReport!permitno
            .txtPermitHolder.SetText rsReport!PermitHolder
        If i <> tot Then
            rsReport.MoveNext
        End If
        End With
    Next i

CRViewer1.ViewReport
Screen.MousePointer = vbDefault

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top