Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
How to create table with variable no. of columns using DEAPI
mohitkadam
Hi,
I want to populate a table from database.However my queries (i plan to get them from properties file) could change and depending on the queries the number of columns returned would change.
But while creating a table i have to specify no. of columns.
TableHandle table = elementFactory.newTableItem("Table", 4);
table.setWidth("100%");//$NON-NLS-1$
DataSetHandle datasetHandle = reportDesignHandle.findDataSet("DataSet");
table.setDataSet(datasetHandle);
Is there a way to only create a table and then add columns on the fly.
Also, can i get column names and no of columns present in my dataset / resultset before creating my table.
I suppose this would fix my problem. Pls help......any help will be appreciated.
-- Thanks
Find more posts tagged with
Comments
mwilliams
<p>Hi mohitkadam,
This devShare post might give you an idea on where to get started:
<a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/617-add-column-to-table-dynamically/'>http://developer.actuate.com/community/forum/index.php?/files/file/617-add-column-to-table-dynamically/</a></p>
;
ankitK
Hi,
I have a similar issue, only difference is that i have a dataset which generates columns via a dynamic query based on user input.
Hence i will not be able to determine the columns in the beforeFactory() Method of the report, as till probably the DataSet.onFetched() [or afterOpen()].
So how should i go about this, adding columns after DataSet.onFetched() [or afterOpen()] has been executed.
Please guide me.
Thanks
Ankit