Plz. help me out. How to retrieve value from row? |
Post Reply |
Author | |
Sunil_Patel
Newbie Joined: 22 June 2010 Status: Offline Points: 5 |
Post Options
Thanks(0)
Posted: 22 June 2010 at 8:17am |
Please help me out..... How to retrieve value from selected row? code for Visual Basic 6.0 |
|
Sunil
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Assuming you have set FocusSubItems = True, this should work:
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Sunil_Patel
Newbie Joined: 22 June 2010 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
Hi! and thanks for your reply and sorry to say friends but it is giving nothing....
|
|
Sunil
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Are you using VirtualMode?
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Are you trying to retrieve every cell value on the row?
Should work. |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Did you add RecordItems with "" and assigned a value to .Caption afterwards ? (if so just use .Caption instead of .Value in code Jason showed, or assign a value to .Value when adding ReportItems)
or maybe you need:
You have to be more specific when posting a thread...
|
|
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.... |
|
Sunil_Patel
Newbie Joined: 22 June 2010 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
thanks for your reply friends and i tried your code but its giving me a
blank value.... how i am adding data in report control, some source
code is below:
Source code ---------------- Public Function Report_Generator() wndReportControl.Records.DeleteAll wndReportControl.Columns.DeleteAll Dim Column As ReportColumn Dim fcount, rsfield wndReportControl.AllowColumnSort = True Const COLUMN_NAME = 1 fcount = rsList.Fields.Count rsfield = 0 Dim i As Long, Record As ReportRecord, Item As ReportRecordItem, str As String Do While fcount > 0 Set Column = wndReportControl.Columns.ADD(rsfield, rsList.Fields(rsfield).Name, 130, True) Column.Visible = True fcount = fcount - 1 rsfield = rsfield + 1 Loop Call AddCol ' Set flat column style ' wndReportControl.PaintManager.ColumnStyle = xtpColumnFlat ' Populate report data items wndReportControl.Populate wndReportControl.FocusSubItems = True wndReportControl.SetCustomDraw xtpCustomBeforeDrawRow End Function Function AddCol() Dim i As Long, Record As ReportRecord, Item As ReportRecordItem, str As String Dim rsf rsf = 0 On Error Resume Next rsList.MoveFirst Do While rsList.EOF = False Set Record = wndReportControl.Records.ADD For rsf = 0 To rsList.Fields.Count - 1 Set Item = Record.AddItem(str) Item.Format = rsList.Fields(rsf).Value Next rsf rsList.MoveNext Loop wndReportControl.Columns(0).Width = 31 wndReportControl.Columns(1).Width = 51 wndReportControl.Columns(2).Width = 51 wndReportControl.Columns(3).Width = 51 wndReportControl.Columns(4).Width = 50 wndReportControl.Columns(5).Width = 50 wndReportControl.Columns(6).Width = 40 End Function if is there any alternate option please provide me.... ur feedback is most welcome..... |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
I don't see that str gets assigned a value from recordset... so you are assigning "empty" value to ReportItem
....
Do While rsList.EOF = False
Set Record = wndReportControl.Records.ADD For rsf = 0 To rsList.Fields.Count - 1 Set Item = Record.AddItem(rsList.Fields(rsf).Value) 'think you need to do this
Next rsf rsList.MoveNext ..... |
|
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.... |
|
Sunil_Patel
Newbie Joined: 22 June 2010 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
Hi! Aaron, thanks for your help and and its working fine.. and please keep writing....
|
|
Sunil
|
|
Sunil_Patel
Newbie Joined: 22 June 2010 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
thanks dud.... and keep writing.....
|
|
Sunil
|
|
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 |