I would like to use the Reporting functionality to create a grid view of a table containing chemical structures and their IDs. I can easily create a table by reading an SD file with structures and names, but I want to convert this to a grid (say 8 columns wide) that is automatically filled with the structures and IDs. How would I go about doing this?
Yes, I had a look at it. I hooked it up before the reporting node, and then tried to fill a grid in the report. However, I only get data from the first table row to choose from. How would I fill the grid in the report automatically with data from all the rows in the table? Ideally the result should be a grid with compound IDs and structure in the same cell (or alternatively on alternating rows).
Thansk for this tip, Simon. I got it working by first using the Column to Grid node, and creating a 5-column grid. Then in the Reporting editor I created a 5-column 2-row table (not Grid!), where I filled the top row with Compound IDs 1 through 5, and the seconds row with images for structures 1 through 5. Upon creating the preview, the table is automatically filled with the remaining structures and their IDs.
You can do this in a single row in the table if you prefer - just add the molecule name and the image for the structure to the same cell. In this case, I’m not sure if there are any advantages to doing it in one row or in two, but sometimes putting multiple data into a single report table cell can help with complicated layouts.
You could also (but there is little point, for this simple case) put a 2 row x 1 column grid into each cell in a single row table, and put the name in one box and structure in the other. Again, this allows much more complex report layouts to be built.
PS - Unfortunately, where you will enter the KNIME / BIRT pain zone is if you want to let the workflow change the number of columns in the grid. As far as I have been able to discern, the only way to do this is to create a separate table for each number of columns you are going to allow, and use the Visibility options to only show the right one, as BIRT (KNIME Reporter) gets very grumpy of extra columns appear or disappear!