1.0.2 • Published 26 days ago

bl2-js-report v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
26 days ago

bl2-js-report

npm i bl2-js-report

💞️ Basic Usage

Add line in component file

import * as bl2Js from 'bl2-js-report';

In html page

<button (click)="downloadPdf()" type="button">Download PDF</button>

In js or ts file

downloadPdf() {
        this.data['fileName'] = 'save-file-name';
        this.data['templateName'] = 'ti-reports/Researcher-Profile-Information'; //file path       
        this.data['data'] = JSON.stringify(this.data);
        this.data['userDetails'] = JSON.stringify(this.userData);
        this.data['isInstitutional'] = JSON.stringify(this.isInstitutional);
        this.data['name'] = JSON.stringify(this.name);

        //Optional
        this.data['view'] = 0; // 0 = false or 1 = true
        this.data['print_r'] = 0; // 0 = false or 1 = true
        let actionUrl = `${reportBackend}/pdf-generate-post`;
        bl2Js(this.data, actionUrl);
    }
1.0.2

26 days ago

1.1.3

4 months ago

1.1.2

1 year ago

1.1.1

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago