IMPRIMIR PROXIMO REGISTRO NO DATA REPORT

CRUZADOR 28/05/2012 12:36:45
#402966
Boa Tarde, estou com um problema na impressão do próximo registro , não estou conseguindo faze-lo no Data Report, segue minha função abaixo, peco ajuda de voces para poder faze-lo, obrigado peloa ajuda.



Private Sub mnuFichaIndividual_Click()

Dim rsRM As New ADODB.Recordset
Dim rsmatricul As ADODB.Recordset
Dim mSQL As String
Dim vlSql As ADODB.Recordset
Dim vlsSql As String
Dim rcPar As ADODB.Recordset
Set rcPar = New ADODB.Recordset
AnoAtivo = 2012

rcPar.Open [Ô]Select * from cad_par where anoativo = [Ô] & AnoAtivo, db, adOpenStatic, adLockReadOnly


Select Case gTipoDB
Case [Ô]MDB[Ô]
Set rsRM = db.Execute([Ô]select top 1 * from alunos01 [Ô])
Case [Ô]POS[Ô]
Set rsRM = db.Execute([Ô]select * from alunos01 [Ô]) [ô][ô][ô] where rm = 2007315[Ô]) [ô][ô] limit 1 [Ô])
End Select



Select Case tbPAR!sigla
[ô] ICM 23/09/2010 10:34 - Elma requerimento de matrícula que a escola não utilizava
Case [Ô]ASS[Ô]
Do While Not rsRM.EOF
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lrm[Ô]).Caption = rsRM!rm
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lnomealuno[Ô]).Caption = rsRM!nome
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lendal[Ô]).Caption = rsRM!endereco
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lbairroal[Ô]).Caption = rsRM!BAIRRO
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lcepal[Ô]).Caption = rsRM!CEP
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lcidadeal[Ô]).Caption = rsRM!cidade
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lufal[Ô]).Caption = rsRM!estado
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lDataAl[Ô]).Caption = VerNull(Format(rsRM!data_nas, [Ô]dd/mm/yyyy[Ô]))
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lemailal[Ô]).Caption = rsRM!emailalu
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lpai[Ô]).Caption = rsRM!pai
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lempresapai[Ô]).Caption = rsRM!empresa_p
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lendpai[Ô]).Caption = rsRM!endereco_pai
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lbairropai[Ô]).Caption = rsRM!bairro_pai
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lceppai[Ô]).Caption = rsRM!cep_pai
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lcidadepai[Ô]).Caption = rsRM!cidade_pai
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lufpai[Ô]).Caption = rsRM!estado_pai
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]ltel1pai[Ô]).Caption = rsRM!tel_cel_pai
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]ltel2pai[Ô]).Caption = rsRM!tel_com_pai
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lmae[Ô]).Caption = rsRM!mae
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lempresamae[Ô]).Caption = rsRM!empresa_m
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lendmae[Ô]).Caption = rsRM!endereco_mae
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lbairromae[Ô]).Caption = rsRM!bairro_mae
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lcepmae[Ô]).Caption = rsRM!cep_mae
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lcidademae[Ô]).Caption = rsRM!cidade_mae
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lufmae[Ô]).Caption = rsRM!estado_mae
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]ltel1mae[Ô]).Caption = rsRM!tel_cel_mae
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]ltel2mae[Ô]).Caption = rsRM!tel_com_mae
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lbusca1[Ô]).Caption = VerNull(rsRM!nomebusca1)
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lbusca2[Ô]).Caption = VerNull(rsRM!nomebusca2)
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lrg1[Ô]).Caption = VerNull(rsRM!rgbusca1)
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]lrg2[Ô]).Caption = VerNull(rsRM!rgbusca2)
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]ltransporte[Ô]).Caption = VerNull(rsRM!transporte)
Drt_informativo.Sections([Ô]Section1[Ô]).Controls.item([Ô]ldia[Ô]).Caption = Format(Date, [Ô]DD[Ô]) & [Ô] de [Ô]
VerificaMes
Drt_informativo.Orientation = rptOrientPortrait
Set Drt_informativo.DataSource = rsRM
Drt_informativo.Show [ô][ô] PrintReport [ô][ô] Show
rsRM.MoveNext
Loop
Exit Sub
End Select
End Sub
TECLA 31/05/2012 21:28:35
#403313
Dê mais detalhes do que deseja fazer.
Seria algo como a imagem abaixo?

Tópico encerrado , respostas não são mais permitidas