Print Page | Close Window

Problem with recordset interaction

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=13314
Printed Date: 21 July 2025 at 12:09am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem with recordset interaction
Posted By: ViperSnake
Subject: Problem with recordset interaction
Date 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



Replies:
Posted By: Aaron
Date Posted: 13 February 2009 at 4:16am
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....



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net