Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- convert() {
- const doc = new jsPDF('p', 'pt', 'A4');
- const col = ['Discharge Date', 'Case Number', 'Patient', 'Hospital', 'Payee', 'Total Doctor Fee', 'To be Collected', 'Payor', 'Remarks', 'Paid', 'Unpaid'];
- const rows = [];
- /* The following array of object as response from the API req */
- const itemNew = this.finalArList;
- itemNew.forEach(element => {
- const temp = [element.dischargeDate, element.caseNo, element.patientName, element.instName, element.clinicName, element.formattedTotalDrFee, element.formattedUnpaidAmounr, element.payor, element.remark, element.formattedTotalDrFee, element.formattedUnpaidAmounr];
- rows.push(temp);
- doc.autoTable(col, rows, {margin: {top: 10}, height: 'auto' });
- });
- doc.save('MyReport.pdf');
- }
Add Comment
Please, Sign In to add comment