How to you add columns definitions / result set to the dataset at runtime?

Hi,

I need to add some columns to a dataset at runtime via Java.

I able to get to the dataset, via .findDataset() method.
I can also set columnHints via StructureFactory.createColumnHints()

But how do I add the actual result set definition for newly created columnHints().
I tried to play with CachedMetaData and ResultSetColumn but that led nowhere - I am getting nulls instead of expected List.

Anyone had luck adding columns at runtime to a dataset?

Answers

  • edited June 18

    This is essentially what I want to duplicate using Java. I can do columnHints, but can not figure out how to do cachedMetaData and resultSet

         <list-property name="columnHints">
                        <structure>
                            <property name="columnName">CITY</property>
                            <property name="analysis">dimension</property>
                            <text-property name="displayName">CITY</text-property>
                            <text-property name="heading">CITY</text-property>
                        </structure>
                    </list-property>
                    <list-property name="parameters"/>
                    <structure name="cachedMetaData">
                        <list-property name="resultSet">
                            <structure>
                                <property name="position">1</property>
                                <property name="name">CITY</property>
                                <property name="dataType">string</property>
                            </structure>
                        </list-property>
                    </structure>
                    <property name="dataSource">Data Source</property>
                    <list-property name="resultSet">
                        <structure>
                            <property name="position">1</property>
                            <property name="name">CITY</property>
                            <property name="nativeName">CITY</property>
                            <property name="dataType">string</property>
                            <property name="nativeDataType">12</property>
                        </structure>
                    </list-property>
    
Sign In or Register to comment.