Adding combo boxes to items in the report |
Post Reply |
Author | |
ryan4isu
Newbie Joined: 29 August 2006 Location: United States Status: Offline Points: 4 |
Post Options
Thanks(0)
Posted: 29 August 2006 at 3:19pm |
Is there any way to add a combo box with different items to each row in the report control? I am trying to use the EditOptions object in the ReportRecordItem class but it does not seem to exist on the ReportRecordItem. Here is an example of the code that I am writing:
Dim oRecord As ReportRecord Dim oItem As ReportRecordItem Set oRecord = moFormApp.rptWorkflowData.Records.Add() Set oItem = oRecord.AddItem(vbNullString) Call oItem.EditOptions.Constraints.Add("first item", 1) -> results in error: "Object variable or With block variable not set" If I try to set the create a new ReportRecordItemEditOptions object I also receive an error. Set oItem.EditOptions = New ReportRecordItemEditOptions -> results in error: "ActiveX component can't create object" |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Before accessing EditOptions property for an item you should call CreateEditOptions -- it initializes further customization. Then access it as regular EditOptions property.
-- WBR, Serge |
|
ryan4isu
Newbie Joined: 29 August 2006 Location: United States Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Thank you for the tip, I am now able to load the combo boxes exactly how I want. My problem now is that the text doesn't change when I select a new value from the combo box. I would also like to be able to add logic to the event that occurs when this value is changed.
|
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Text should change correctly, looks like the problem somewhere in your code. There should be something like:
Look at ValueChanged event. In general, look at standard ReportSample application, TaskList form (menu Test / Task List sample). It shows how to handle all those things. -- WBR, Serge |
|
ryan4isu
Newbie Joined: 29 August 2006 Location: United States Status: Offline Points: 4 |
Post Options
Thanks(0)
|
I found out that the value was changing but the caption wasn't. Thanks again for your help.
|
|
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 |