Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Combobox with Database
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Combobox with Database

 Post Reply Post Reply
Author
Message
wismerhill View Drop Down
Newbie
Newbie


Joined: 16 May 2008
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote wismerhill Quote  Post ReplyReply Direct Link To This Post Topic: Combobox with Database
    Posted: 04 June 2008 at 11:24am
Hello,

I have a combobox in the first column of a report control. The data source of this combobox is the result of a recordset :

RptControl_TA.Columns.Column(0).EditOptions.Constraints.Add RsTA.Fields("CODE_TA").Value & " - " & RsTA.Fields("LIB_TA").Value, i + 1


When i want to load the data, i add to the combobox column the following information (the same caption as before).
Record.AddItem RsListe.Fields("CODE_TA").Value & " - " & RsListe.Fields("LIB_TA").Value

But the combobox is empty.

I can only recover some information when i use Record.AddItem 1 (where 1 is the second parameter : i+1)

Can we use the caption to fill the combobox ?
Else i will need to use a tab to save the caption and the data code and research for each record the good caption.

Thanks
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: 05 June 2008 at 2:34am
Hi,
 
Can you upload a sample?
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
wismerhill View Drop Down
Newbie
Newbie


Joined: 16 May 2008
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote wismerhill Quote  Post ReplyReply Direct Link To This Post Posted: 05 June 2008 at 3:29am
Of course,

I upload you a sample.

uploads/20080605_032849_Sample.zip
Back to Top
wismerhill View Drop Down
Newbie
Newbie


Joined: 16 May 2008
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote wismerhill Quote  Post ReplyReply Direct Link To This Post Posted: 05 June 2008 at 5:34am
Thanks to Aaron, my problem was solved.

The solution is to declare for my combobox : Column.EditOptions.ConstraintEdit = False
 
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: 05 June 2008 at 6:23am
Hi,
 
I'm a little confused right now
 
I looked in the help (first time I didn't read it properly) and thought this is going to solve your problem and it did ?!?! but why, see Remarks
 

Remarks

If True, then you can only choose from the list of constraints added.

If False, then you can type a custom response not listed in the list of constraints.

 
Why does this property has an influence on this ???
Please explain....
 
 
And @wismerhill
This will have the same effect and you can only select the items in the combo:
 
''Column.EditOptions.ConstraintEdit = False
Column.EditOptions.AllowEdit = False
 
In the help:

Remarks

If False, then any editing features will not be used.  The Combo button and Expand buttons will not be displayed

If True, then all ReportRecordItems can be edited, you will need to set the EditOptions to false for each column that can not be edited, or you can set the EditOptions for each individual ReportRecordItem.

Now, this is helpfull isn't it?  
 
Well it works @wismerhill , right? Maybe we will get a reply of the supportteam and clear things....
 
 
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
 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.186 seconds.