Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - combox pulldown list index
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

combox pulldown list index

 Post Reply Post Reply
Author
Message
axdoverm View Drop Down
Groupie
Groupie
Avatar

Joined: 16 August 2008
Location: Netherlands
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote axdoverm Quote  Post ReplyReply Direct Link To This Post Topic: combox pulldown list index
    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
Back to Top
axdoverm View Drop Down
Groupie
Groupie
Avatar

Joined: 16 August 2008
Location: Netherlands
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote axdoverm Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 3:21am
Hi Aaron,
 
I just got your message and i wil give it later today a try .... i will keep je informed.
 
Thanks in advandce
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 4:09am
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....
Back to Top
axdoverm View Drop Down
Groupie
Groupie
Avatar

Joined: 16 August 2008
Location: Netherlands
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote axdoverm Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 6:17am
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   ......
 
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 9:13am
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....
Back to Top
axdoverm View Drop Down
Groupie
Groupie
Avatar

Joined: 16 August 2008
Location: Netherlands
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote axdoverm Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 1:42pm

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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.