Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Export and Extra Fields

    Hi,

    I'm trying to export my listgrid data, which has fetched its data using a specific operation ID with the dropExtraField attribute set to "false".

    Here is a small (fake) example:

    Code:
     <operationBinding operationType="fetch" operationId="testExport" dropExtraFields="false">
    	    	<selectClause>
    	    		CIF_CUSTOMER.*, 123456 as FOO
    	    	</selectClause>
    		</operationBinding>
    If I directly send a fetch request with this operationId, I correctly receive FOO in the response.

    Code:
    [
        {
            affectedRows:0, 
            data:[
                {
                    CREATED_BY:1, 
                    REFERENCE:"ENT-1212 TEST:Recalcitrant", 
                    FULL_NAME:"Computer transport partners", 
                    UPDATED_BY:1, 
                    UPDATED:"$$DATESTAMP$$:1395649182733", 
                    ID:7, 
                    COUNTRY_INCORP:236, 
                    CREATED:"$$DATESTAMP$$:1395649182733", 
                    CUSTOMER_TYPE:2, 
                    FOO:123456, 
                    ACTIVE:1
                },
    But when I call export, even if I set the export fields including FOO, this field does not appear in the report :

    Code:
    [...]
    		requestProperties.setCriteria(searchCriteria);
    		requestProperties.setOperationId("testExport");
    		requestProperties.setExportFields("REFERENCE", "FULL_NAME", "FOO");
    		list.exportData(requestProperties);
    [...]
    Report sample:
    Code:
    "Reference","Name"
    "ENT-1201 TEST:Data/documentation missing or issue","Computer aggregation agency"
    "ENT-1188 TEST:Data/documentation missing or issue","Computer aggregation INC"
    "ENT-1235 TEST:Non-U.S./Passive NFFE","Computer construction LLC."
    In my real program, systematically, extra fields cannot be exported which is a real problem when producing reports!

    Can you please have a look ?

    Many thanks,

    Thomas

    #2
    Presumably this isn't a declared DataSourceField - while we do support delivering data to the client in the absence of a DataSourceField, exporting has a lot more dependencies on knowing the field type and other details. So you should declare a field for "FOO" - if it's marked hidden="true" it won't appear in any UI components.

    Comment

    Working...
    X