Problem with recordset interaction |
Post Reply |
Author | |
ViperSnake
Newbie Joined: 13 March 2008 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 02 February 2009 at 12:16pm |
Im using Report Control V11.2 and im having a problem when i insert a new row from a record set. The code below worked fine until now. Im using a RecordSet with a OLEDB connection to add records to the report control:
Sub LoadGrd()
Dim L As Integer ReportControl.Records.DeleteAll For L = 0 To (adoRS.RecordCount - 1) AddRecord adoRS!Cod_Aluno, adoRS!Aluno,adoRS!Cod_Turma, adoRS!Localidade_Aluno If Not adoFichasAlunoRS.EOF Then adoFichasAlunoRS.MoveNext Next ReportControl.Populate End Sub '------------------------------------------------------------------------------------
Sub AddRecord(pNumero, pNome, pTurma, pLocalidade As Variant)
Dim Record As ReportRecord Set Record = Me.ReportControl.Records.Add() Record.AddItem pNumero Record.AddItem pNome Record.AddItem pTurma Record.AddItem pLocalidade
Set AddReportRecord = Record
End Sub The problem is that when i do the movenext event on the recordset, it changes the data of all previous records of the report control and puts them like the one on the recordset...
So if I have 10 records on the recordset i end up with 10 records on the report control equal to the last one on the recordset.
Any ideas?
Tank You for your time..
|
|
Product: Xtreme SuitePro(ActiveX) version 11.2.2
Platform: Windows XP (32bit) - SP 3 Language: Visual Basic 6.0 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Can you upload test project? I haven't had any problems with loading records from database but it would be easier to when you could create test for this
Thanks
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |