how find row? |
Post Reply |
Author | |
mozaheb
Senior Member Joined: 03 April 2008 Status: Offline Points: 104 |
Post Options
Thanks(0)
Posted: 22 June 2008 at 12:28pm |
hi
1-how find row in report control when add new record and setfocuse on row? 2-how find row with tag? please reply thank you |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Please upload sample project and add comment what and where you want it
|
|
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.... |
|
mozaheb
Senior Member Joined: 03 April 2008 Status: Offline Points: 104 |
Post Options
Thanks(0)
|
when add new record in report control, i want setfocuse on newer record
or when search tag and find and setfocuse on record |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
That's why I wanted you to upload a sample... The first question I can answer but the second I really don't know what you mean.
Private Sub AddRecord()
Dim XtremeRecord As XtremeReportControl.ReportRecord Dim XtremeRecordItem As XtremeReportControl.ReportRecordItem Set XtremeRecord = wndReportControl.Records.Add()
Set XtremeRecordItem = XtremeRecord.AddItem("test") wndReportControl.Populate 'Focus added record
End Sub Note: I would expect that the row (with option 3) is focused and selected but it isn't (look in the help!!!) Maybe a support member can explain why
|
|
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.... |
|
mozaheb
Senior Member Joined: 03 April 2008 Status: Offline Points: 104 |
Post Options
Thanks(0)
|
thank you for answer my question #1
now, please guide me for how find record by tag? example : in my report control added 1000 record and i want find record with tag and setfouse on record. |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
You assigned a value to a tag? And you want to find the value (tag) in all records?
May I ask why you want to this?
|
|
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.... |
|
mozaheb
Senior Member Joined: 03 April 2008 Status: Offline Points: 104 |
Post Options
Thanks(0)
|
yes yes, please guide me, thank you
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
I have been experimenting a lot with the ReportControl but I never needed to use the .Tag before. That's why I asked you: Why do you need this anyway? Maybe I can help you and don't have to use the .Tag property at all
Here's a function to iterate the RC records
Private Function FindTag(strTag As String)
Dim record As XtremeReportControl.ReportRecord For Each record In wndReportControl.Records If record.Tag = strTag Then MsgBox "Record found... Index = " & record.Index Next record End Function |
|
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.... |
|
mozaheb
Senior Member Joined: 03 April 2008 Status: Offline Points: 104 |
Post Options
Thanks(0)
|
i want use tag for set Record ID and when update database update Record id, for this problem use tag to find record id and update items of record.
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Ok,
There are other ways of doing this but than I have to know how you load the database records and how your table looks.
Maybe you could check this post:
and look for sample:
uploads/20080602_072905_ReportVirtualDa.zip
This will load a recordset into a RC in virtual list mode and you can edit items and will be immediately updated in database.
|
|
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.... |
|
mozaheb
Senior Member Joined: 03 April 2008 Status: Offline Points: 104 |
Post Options
Thanks(0)
|
hi again, thank you
but i dont use virtual mode... please guide me |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Virtual mode is like you would open your table (in my case MS Access). The recordset is loaded into ReportControl using the BeforeDrawRow event
first row will be the first row in ReportControl
second row will be the second row in ReportControl and so on
If you load the recordset of database as records you will have the same as with virtual records (my sample)
Show me how you load the records from the database? I want to help you but I don't know: what database you use? how you load records? As I said before upload a sample project and I will help you. If you don't want me to see the data in the database make a sample with some dummy data. As long the columns are the same as yours so it isn't to difficult to change it for your needs.
|
|
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.... |
|
mozaheb
Senior Member Joined: 03 April 2008 Status: Offline Points: 104 |
Post Options
Thanks(0)
|
hi
example , i want add this option for user to select checkmark for show number o same name for each contact if find name in database... now if found number replace number with contact name, and i want replace record in RC in a few second. my data base : access (MDB) example source : Sub Refresh_Inbox() Dim DataInbox As ClsDataBase Set DataInbox = New ClsDataBase LstInbox.Records.DeleteAll LstInbox.Populate Call DataInbox.Get_AllRecivedSMS(SMSReciveRecords, PCon) While Not ContactsRecords.EOF Call AddRecordList(ContactsRecords!ID, ContactsRecords!Active, ContactsRecords!Name, ContactsRecords!MobileNum, ContactsRecords!GroupName, ContactsRecords!Field1, ContactsRecords!Field2, ContactsRecords!Field3, ContactsRecords!Field4, ContactsRecords!LastSend, ContactsRecords!SmsCount) ContactsRecords.MoveNext Wend 'Updates the Report LstInbox.Populate LstInbox.FocusSubItems = False End Sub thank you |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Here's s test project. Copy your database in the same directory as the project and change the database and table name in the form load event. Data will be loaded and you can change the items as you wish and are updated in the database!!! So don't use your original database
Good luck !
|
|
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.... |
|
Baldur
Senior Member Joined: 22 November 2006 Location: Germany Status: Offline Points: 244 |
Post Options
Thanks(0)
|
It's very simple:
dim xReportRow as ReportRow
dim xMyTag as variant
for each xReportRow in ReportControl.rows
if xReportRow.Record.Tag = xMytag then
ReportControl.FocusedRow = xReportRow
exit for
end if
next
The same can do with each property.
|
|
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 |