I'm trying to add a table with a x value column (PPM) and several y column (C1:C4) to a report. I'd like to be able to selectively display column C1:C4 and leaving the same x column PPM using a parameter called Nomi
I used a similar approach to the one show in the Knime Cookbook for row filter but is not working giving an error such as "your column does not exist"...
Yes - BIRT is very fussy about the 'shape' of the data... If your incoming data table changes spec - eg you add or remove any columns - then the report will require the data source to be updated. This will also make the report generation fall-over if the report references a column that no longer exists.
So with this in mind, it is usually better to pass all of the data to BIRT, but then to control the visibility of columns - which you can do with your report parameter (workflow variable).
I have modified your workflow as follows:
Only pass the C1 -> C4 columns as column choices for inclusion (assuming you always want to show the PPM column)
Added a dynamic text item at the top of the report to feedback on the choice of column(s)
Added a script to control the visibility property of each of the C1 -> C4 columns in the report, based on the parameter selection(s)
Added some example number formatting to the numeric columns
The modified workflow is attached, but for anyone that is just interested in the visibility script - it looks like this (for column C1):
I'm not very javascripty(!) - and couldn't quickly figure-out how to interact with the params Array object directly (rather than via String). Also, if anyone knows how to retrieve the column name programmatically in BIRT (something like "col.__colname"?), then that would be a nice improvement - rather than needing to edit the value for each column. But I guess this is readable, and works!
I think that the main problem is with the column binding of BIRT, i.e. BIRT do not reset it.
There is a way to sort it out with a javascript (which I do not know); furthermore the latest version of BIRT include a clean button in the column binding tab to solve this problem. It would be great for KNIME to support more recent version of BIRT.