combox pulldown list index |
Post Reply |
Author | |
axdoverm
Groupie Joined: 16 August 2008 Location: Netherlands Status: Offline Points: 14 |
Post Options
Thanks(0)
Posted: 16 August 2008 at 4:57am |
Hey too all your guys out there. I just start using te reportcontrol, witch is by the way a supertool ...... but i have a simple question. In my reportcontrol i have a combobox wich contains values. I understand how the get the caption (value) from the selection that the user made. But i need to know the index of the selected value so i can match this with a value in a other control.
I hope someone can help me with this, because i spent the last 2 days searching for a solution ..... and i start too pullout my hair
|
|
axdoverm
Groupie Joined: 16 August 2008 Location: Netherlands Status: Offline Points: 14 |
Post Options
Thanks(0)
|
Hi Aaron,
I just got your message and i wil give it later today a try .... i will keep je informed.
Thanks in advandce
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
I don't know if there's another way but you could loop constraints of item like this in ValueChanged event:
Dim itemConstraint As ReportRecordItemConstraint
If Item.EditOptions.Constraints.Count > 0 Then For Each itemConstraint In Item.EditOptions.Constraints If itemConstraint.Caption = Item.Caption Then MsgBox itemConstraint.Index End If Next itemConstraint End If If your issue has been solved, please add SOLVED in your Topic description and have a look at post http://forum.codejock.com/forum_posts.asp?TID=11225
|
|
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.... |
|
axdoverm
Groupie Joined: 16 August 2008 Location: Netherlands Status: Offline Points: 14 |
Post Options
Thanks(0)
|
Hi,
I tried your first solution:
Private Sub ReportControl1_ConstraintSelecting(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Constraint As XtremeReportControl.IReportRecordItemConstraint)
MsgBox Constraint.Index End Sub and i get back the right index. The ReportControl1_ConstraintSelecting event only fires when i change the selection with my keyboard, but not when i use the mouse to select the item in the list??
So i tried the second solution but i receive a error : object variable or with block variable not set : Runtime Error 91
I think i'm missing something ......
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Seems that it's the only way to get index of constraint. I guess we need an event:
Private Sub wndReportControl_ConstraintSelected(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Constraint As XtremeReportControl.IReportRecordItemConstraint)
msgbox Constraint.Index End Sub or in ValueChanged event reference of selected constraint I will add it to my list and maybe a support member can take a look at this.
But if you need this you could use the code (above).
|
|
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.... |
|
axdoverm
Groupie Joined: 16 August 2008 Location: Netherlands Status: Offline Points: 14 |
Post Options
Thanks(0)
|
Hi, Thanks again for your reply, tonight i will give it another try .... i will keep you informed. I hope someone at the support can take a look at it .... and i hope someone can show my the right way.. Greeting Andre
|
|
Product: Xtreme SuitePro (ActiveX) version 11.2.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 |
|
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 |