This is how it looks like in Our DataSource File
<DataSource
ID="dsID"
serverConstructor="className"
useMemoryPaging="false"
gridResultsPerPage="1000"
dbResultsPerPage="4000"
useLabelService="true"
exportReportDate="false"
exportConstructor="ClassName"
exportTitle="Adhoc Report"
>
<fields>
<field name="title" type="text" title="Project Name" defaultDisplay="true" valueXPath="project/title"/>
<field name="InspectionCountsTotal" fieldGroup="InspectionCounts" type="integer" defaultDisplay="true" labelCode="Label.Grid.InspectionCounts"/>
</fields>
</DataSource>
As you notice we have two types of field , where for one we have direct mapping with DO and Other we did flattening of data using valueXPath, for bot types of fields, it display correctly on GRID
but while exporting, it was not able to populate value for field which we have flattened data using valueXPath for example it displays value for project name in grid, but while exporting as excel it has blank for projectName for all row
Do we need to add any extra property in datasource to support export functionality?
<DataSource
ID="dsID"
serverConstructor="className"
useMemoryPaging="false"
gridResultsPerPage="1000"
dbResultsPerPage="4000"
useLabelService="true"
exportReportDate="false"
exportConstructor="ClassName"
exportTitle="Adhoc Report"
>
<fields>
<field name="title" type="text" title="Project Name" defaultDisplay="true" valueXPath="project/title"/>
<field name="InspectionCountsTotal" fieldGroup="InspectionCounts" type="integer" defaultDisplay="true" labelCode="Label.Grid.InspectionCounts"/>
</fields>
</DataSource>
As you notice we have two types of field , where for one we have direct mapping with DO and Other we did flattening of data using valueXPath, for bot types of fields, it display correctly on GRID
but while exporting, it was not able to populate value for field which we have flattened data using valueXPath for example it displays value for project name in grid, but while exporting as excel it has blank for projectName for all row
Do we need to add any extra property in datasource to support export functionality?
Comment