Export to PDF does not display data with zero value in currency columns

Hi!

I have a doubt when exporting a column of type currency to PDF.

In the example that I attach, when exporting the price of water appears empty and I would like to show $0.00.

Is it possible?

Thanks a lot in advance and have a nice day :-)


Attachment: currencyexportpdf_778d4739.zip

3 Replies 1 reply marked as answer

RR Rajapandi Ravi Syncfusion Team November 16, 2020 12:42 PM UTC

Hi Alex, 

Greetings from syncfusion support 

We have analyzed your query and we could see that you like to exporting a column value with currency sign. Based on your query we have prepared a sample and achieve your requirement. Please refer the below code example and sample for more information. 

 
<template> 
  <div id="app"> 
    <div> 
      <ejs-grid 
        ref="grid" 
        :dataSource="data" 
        :allowSorting="true" 
        :toolbar="toolbar" 
        :allowPdfExport="true" 
        height="273px" 
        id="grid" 
      > 
        <e-columns> 
          <e-column 
            field="CaseID" 
            headerText="Order ID" 
            :isPrimaryKey="true" 
            width="100" 
          ></e-column> 
          <e-column 
            field="Freight" 
            headerText="Freight" 
            allowGrouping="false" 
            width="120" 
            format="C2" 
            textAlign="Right" 
          ></e-column> 
          . . . . . . . 
          . . . . . . . 
        </e-columns> 
      </ejs-grid> 
    </div> 
  </div> 
</template> 
 
<script> 
import Vue from "vue"; 
import { 
  GridPlugin, 
  Toolbar, 
  Edit, 
  Sort, 
  Resize, 
  Reorder, 
  ColumnMenu, 
  ColumnChooser, 
  PdfExport, 
} from "@syncfusion/ej2-vue-grids"; 
import { ButtonPlugin } from "@syncfusion/ej2-vue-buttons"; 
 
Vue.use(ButtonPlugin); 
 
Vue.use(GridPlugin); 
 
export default { 
  name: "App", 
  data: () => { 
    return { 
      data: [ 
        { 
          Market: "Atlanta", 
          Freight: 32.38, 
          . . . . . . . . . 
          } 
      ], 
      formatOptions: { type: "date", format: "M/d/y" }, 
      editSettings: { 
        allowEditing: true, 
        allowAdding: true, 
        allowDeleting: true, 
        mode: "Normal", 
      }, 
       
  }, 
  methods: { 
    clickHandler: function (args) { 
      if (args.item.id === "savebutton") { 
        this.$refs.grid.endEdit(); 
      } 
      if (args.item.text === "PDF Export") { 
        this.$refs.grid.pdfExport(); 
      } 
    }, 
  }, 
  provide: { 
    grid: [ 
      Toolbar, 
      Edit, 
      Sort, 
      Resize, 
      PdfExport, 
      Reorder, 
      ColumnMenu, 
      ColumnChooser, 
    ], 
  }, 
}; 
</script> 


Screenshot: 

 


Regards, 
Rajapandi R


AL Alex November 17, 2020 07:36 AM UTC

Hello!

Thank you very much for your reply.

I still have the same problem. 

Maybe I don't explain myself well enough because  I don't see anything referring to PDF export in your codesandbox example :-)

What I would like to achieve is that when exporting to PDF, the quantities with value 0 (like water in the example that I attached) are also printed with the currency symbol ($0.00). Now is printing and empty cell.

Is this possible?

Thank you very much in advance and have a nice day.




RS Rajapandiyan Settu Syncfusion Team November 18, 2020 09:11 AM UTC

Hi Alex, 
 
Thanks for your update. 
 
We can reproduce the reported behavior at our end and we have confirmed this is an issue from our side and logged a bug for the same as currency format column exports 0 as empty value instead of $0.00 in pdf”. At Syncfusion, we are committed to fixing all validated defects (subject to technical feasibility and Product Development Life Cycle ) and will include the defect fix in our upcoming patch release which will be rolled out on Dec 02nd, 2020. 
 
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.  

 
Regards, 
Rajapandiyan S

Marked as answer
Loader.
Up arrow icon