Announcement

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

    ExportData: how to set decimal format for float values

    While exporting using exportData we like to export float with 2 decimal point.How can we set that is there any setting available for this in ds etc.
    also overall how we can set these setting is there any specific place to specify the formats for date , decimal etc
    Note: we are using Java in the server side

    #2
    See DataSourceField.exportFormat (and also just "format").

    Comment


      #3
      Thanks for the Information. Also how to set the Timezone info while using exportData() that will be helpful.This is on exporting Grid xls.
      i believe i can use exportTZ ?
      Last edited by kmbilal; 4 Jun 2021, 09:21.

      Comment


        #4
        Yes, exportTZ.

        Comment


          #5
          We have tried to use exportTZ in our request for exportData functionality for export as ooxml or xls format,but it still using server time zone for formatting datetime field in exported excel file

          This is how we are using exportTZ

          //export opts

          exportOpts = {
          exportAs : "xls",
          exportDisplay : "download",
          exportFilename : EXPORT_FILENAME + ".xls",
          message : "Excel (Compatiblity)",
          exportTZ : "client"
          }

          //passing options to exportData method

          _gridObject.exportData(exportOpts)


          //This is how we declared our fields inside datasource



          <fields>


          <field name="inspectionDate" type="datetime" title="Inspection Date" defaultDisplay="true" dateFormatter="toUSShortDateTime"
          />
          <field name="createDate" type="datetime" title="System Date" defaultDisplay="true" dateFormatter="toUSShortDateTime"
          />
          </fields>

          Let us know if we need to change anything else

          We are using SmartClient Ajax RIA system
          Version v12.1p_2021-05-18/PowerEdition Deployment (2021-05-18)
          Last edited by kmbilal; 7 Jun 2021, 14:36.

          Comment


            #6
            any update we can get for this ?

            Comment


              #7
              We've made changes that will be available for download in nightly builds since June 12 (tomorrow). Your setup should work fine, i.e. exported Excel will use client timezone. Let us know please how it worked for you.

              Comment


                #8
                Sure thanks will check and update once available.

                Comment

                Working...
                X