[go: up one dir, main page]

Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Get the index of the cell in Birt - Any function?(A way to get the index of a cell in a table)
Get the index of the cell in Birt - Any function? [message #1833444] Tue, 13 October 2020 12:56 Go to next message
gale weinstein is currently offline gale weinsteinFriend
Messages: 10
Registered: October 2020
Junior Member
Hi,
I am for hours trying how to do it but to no avail.
Is there any way I can get in javascript code the index of a cell in a table?
Re: Get the index of the cell in Birt - Any function? [message #1833503 is a reply to message #1833444] Thu, 15 October 2020 07:49 Go to previous messageGo to next message
gale weinstein is currently offline gale weinsteinFriend
Messages: 10
Registered: October 2020
Junior Member
More explanation on the issue:
I have a table in which I have to set background color when the cell in header and cell in row appear as pair in a certain list in data source. For example: column : "AUD, USD" row : "BRL, CZK"

in the cell of column AUD and row is BRL I check if exists in the list in datasource and if so I need to color in a certain color.

Now, I thought to do it in this way: columns and rows will be in lists. I go over both lists and then color in those indexes the cell.

The problem is that I don't know how to set color to a certain cell in table.

Is there any way to do it or any documentation?

I would appreciate any comment!
Re: Get the index of the cell in Birt - Any function? [message #1833585 is a reply to message #1833503] Mon, 19 October 2020 08:18 Go to previous messageGo to next message
dmitry khotsko is currently offline dmitry khotskoFriend
Messages: 38
Registered: March 2020
Member
this.getRowData().getColumnValue(/*number of column - int, or name -string*/)
Re: Get the index of the cell in Birt - Any function? [message #1833599 is a reply to message #1833585] Mon, 19 October 2020 13:59 Go to previous messageGo to next message
dmitry khotsko is currently offline dmitry khotskoFriend
Messages: 38
Registered: March 2020
Member
sorry. I thought you need a rowdata. maybe you can create a counter for y-position and use getRowData().getColumn(num of column that you need) for x-position
Re: Get the index of the cell in Birt - Any function? [message #1833622 is a reply to message #1833503] Mon, 19 October 2020 22:00 Go to previous messageGo to next message
rbaak Mising name is currently offline rbaak Mising nameFriend
Messages: 31
Registered: July 2009
Member
If you want to change the color of the cell. Click in your cell. Go to the property editor of the Cell and select the highlights tab.



Re: Get the index of the cell in Birt - Any function? [message #1834097 is a reply to message #1833622] Mon, 02 November 2020 14:42 Go to previous messageGo to next message
gale weinstein is currently offline gale weinsteinFriend
Messages: 10
Registered: October 2020
Junior Member
H,
thanks for answering.
Dmitry, can you show me a sample code that I can do? Isn't getColumn() a function for dataset column number and not a table's?
rbaak, I would like to do it a way which will be with no duplicated code? Do you have another solution?
Re: Get the index of the cell in Birt - Any function? [message #1834132 is a reply to message #1834097] Tue, 03 November 2020 13:59 Go to previous messageGo to next message
rbaak Mising name is currently offline rbaak Mising nameFriend
Messages: 31
Registered: July 2009
Member
Hi Gale,

Do you have some sort of sample of what your are trying to achieve?

Maybe try using getElementById() and get the Element ID from the general tab of each cell? Could be a long script but if you want it all in one place can be worth a try.


Re: Get the index of the cell in Birt - Any function? [message #1834342 is a reply to message #1834132] Sun, 08 November 2020 08:28 Go to previous messageGo to next message
gale weinstein is currently offline gale weinsteinFriend
Messages: 10
Registered: October 2020
Junior Member
I am setting a table with constant headers and left column with currencies:
The cell whose combination of currencies (header and left cell in row ) are true according to some logic should be colored in a certain color.
Re: Get the index of the cell in Birt - Any function? [message #1834857 is a reply to message #1834342] Thu, 19 November 2020 09:31 Go to previous messageGo to next message
dmitry khotsko is currently offline dmitry khotskoFriend
Messages: 38
Registered: March 2020
Member
Hi, you can add scripts for any object in birt. on tab scripts. or you can create dataset computed column with function RUNNING COUNT and then you can find this column value.
on render method you add script with your condition and change color
Re: Get the index of the cell in Birt - Any function? [message #1834860 is a reply to message #1834857] Thu, 19 November 2020 09:47 Go to previous messageGo to next message
dmitry khotsko is currently offline dmitry khotskoFriend
Messages: 38
Registered: March 2020
Member
hi. i made an report for you. but I can't add screens to this message.
Re: Get the index of the cell in Birt - Any function? [message #1834862 is a reply to message #1834342] Thu, 19 November 2020 09:53 Go to previous message
dmitry khotsko is currently offline dmitry khotskoFriend
Messages: 38
Registered: March 2020
Member
sorry. I'm stupid:)
in the end I've got report whre every 3 cell have red background
  • Attachment: view1.png
    (Size: 81.01KB, Downloaded 149 times)
  • Attachment: view2.png
    (Size: 85.28KB, Downloaded 146 times)
  • Attachment: view3.png
    (Size: 84.47KB, Downloaded 138 times)
  • Attachment: view4.png
    (Size: 84.79KB, Downloaded 141 times)

[Updated on: Thu, 19 November 2020 09:54]

Report message to a moderator

Previous Topic:BIRT: Tables inside cells of another table in excel
Next Topic:Cells Function similar
Goto Forum:
  


Current Time: Thu Dec 12 16:50:23 GMT 2024

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

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

Back to the top