![]() |
Report Questions |
Post Reply ![]() |
Author | |
Maui ![]() Groupie ![]() Joined: 10 June 2004 Status: Offline Points: 95 |
![]() ![]() ![]() ![]() ![]() Posted: 05 August 2004 at 6:06am |
I have some questions regarding the ading and editing of cell data using the report control that I am hoping someone can help with. In your other controls you have the theme of being able to create an item and assign it your own id so you later access it. eg with the Control bars So, naturally when it came time to use the report control I assumed you would have the same theme and I put this code in my app to create some columns. Public Const COLUMN_DATEISSUED = 101 This works fine and I can see that .Columns.Find would work the same as your other controls but I am having trouble finding and editing cell data and I cant see how our user defined IDs can help. My problem occured when I tried to add data to the report. I eventually found out that you arent free to define your own IDs. You have to make your column identifiers sequential and 0 based. eg I had to change This brings me to my questions: 1. Why has this methodology changed? We could have our own unique identifiers before, but now we have to have them 0 based. This isnt really that big a problem but it is different from all the other controls you do so I am wondering why? 2. If the AddItem method uses the current column Index rather than our own defined ID's then how do we know what column you are adding into? or rather ammending? Do we have to loop across columns to get to the item we want to add / ammend? The sample app doesnt really show this as it just creates Items and adds them in sequentially. It doesnt really show how its position is kept track of. Wouldnt it have been clearer to do it like this.... 3. Could you provide an example to show how to change the value in a cell please. Thanks |
|
![]() |
|
ianp ![]() Moderator Group ![]() ![]() Joined: 19 December 2003 Location: United Kingdom Status: Offline Points: 119 |
![]() ![]() ![]() ![]() ![]() |
Hi Maui In response to your third question, the Report Control sample the following code will change value of the 4th item in the 3rd record. If you change the group, column or sort orders, then try the code again, the same item in the same record will be changed:
I'm afraid I can't answer the first two questions for you, but remember, this is the first release of the control. The other controls were quickly added to and improved based on suggestions in the forums... Edited by ianp |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
I will attempt to answer 2.
You can use the Tag property to assign a value or ID to each Record if you like. When adding items to a Record, you have to add the items in the same order that the Columns were added, even if the column is not visible, or the column order has changed, you still add the items in the same order without skipping any. If the item is blank, then add a item with "" as a value. So that is how you know which collumn the item is being added to. For number one, if you take a look at the help file you will see that it states how the columns use the Index and ItemIndex properties. I think you will find the ReportControl help more to your liking. I've read your other post regarding the help and I think the ReportControl help is closer to what you would expect? Edited by SuperMario |
|
![]() |
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 |