Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » creating new table rows in script
creating new table rows in script [message #1110437] Mon, 16 September 2013 22:29 Go to next message
Gibran Shah is currently offline Gibran ShahFriend
Messages: 33
Registered: September 2013
Member
Hello,

I'm wondering if there's a way to add rows to a table dynamically in script. I've got a table in a report and I'm starting in the onCreate script for the table. Would this be the right place to do it? And what would a script that creates new rows in a table, and then adds data to it, look like?
Re: creating new table rows in script [message #1110660 is a reply to message #1110437] Tue, 17 September 2013 06:41 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Can you explain more about what exactly you're trying to do, so I can try to provide the best solution for your scenario?

Michael

Developer Evangelist, Silanis
Re: creating new table rows in script [message #1110945 is a reply to message #1110660] Tue, 17 September 2013 14:38 Go to previous messageGo to next message
Gibran Shah is currently offline Gibran ShahFriend
Messages: 33
Registered: September 2013
Member
Michael Williams wrote on Tue, 17 September 2013 02:41
Can you explain more about what exactly you're trying to do, so I can try to provide the best solution for your scenario?


Sure,

I'm trying to populate a table with data from a 3D array that I created in script. So it's not a dataset. So I can't bind the table to it in the usual way. This means that I have to create the table dynamically. i.e. I have to iterate through the array and create rows for each step in the iteration. Ultimately, I want to do this for several different tables (each one being a different kind of table so I can't just repeat the same table). Each table will consist of data from a different index in the 2nd dimension of the array. That is to say, if you think of the array as [person's ID][tax form][field data], then each table represent a tax form (i.e. a T4 slip or a T3, etc.). So the script for, say, the T4 table will look into [person's ID]["T4"] and iterate through the field data at that index filling in the table with that data. The script for, say, the T3 table will look into [person's ID]["T3"] and so on.

The original dataset from which I created this 3D array was just too disorganized and contained superfluous data, so I couldn't use it (at least, I couldn't figure out a simple way to bind it to the many tables I need). So I created a more organized and ordered array in script. Of course, how to bind the data in the array to the tables now becomes the tricky part, but I figured there must be a way to do it even if I have to create each row dynamically through script.
Re: creating new table rows in script [message #1111786 is a reply to message #1110945] Wed, 18 September 2013 18:38 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

So, creating scripted datasets from your array to populate your table wouldn't be an option? Where do you populate this 3D array?

Michael

Developer Evangelist, Silanis
Previous Topic:Error while opening .rptdesign file in Eclipse Juno
Next Topic:BIRT Large Dataset Performance
Goto Forum:
  


Current Time: Sat Oct 23 09:24:59 GMT 2021

Powered by FUDForum. Page generated in 0.05428 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top