cancel
Showing results for 
Search instead for 
Did you mean: 

Export to PDF using scripts in SAC

0 Kudos
809

Hello Team,

When I'm writing simple script to export to PDF using a button on click event, the report is not getting exported and it is stuck with screen message as below:

Export_data.png

 I wrote the below script on a button after enabling "Export to PDF" option in Outline.

Export_data_2.png

Accepted Solutions (0)

Answers (1)

Answers (1)

N1kh1l
Active Contributor
0 Kudos

@dharmendrachaudhary-1 

Could you try exportReport() method.

 

Nikhil

0 Kudos
I have tried this API also but it didn't work.
N1kh1l
Active Contributor
0 Kudos
Does the normal pdf export using file option works ? Also check in dev tool debugger if there are any error messages being shown there.
0 Kudos
yes, the normal export is working. I checked in debugger there is a message shown as " Cannot read properties of null (reading 'size') at t.sliceResultForFormattingCells (app.chunk.68.c5f570d26c5eaee5ba91.js:10:424702) at t.finishCSVExport (app.chunk.68.c5f570d26c5eaee5ba91.js:10:419916)".
N1kh1l
Active Contributor

Just check if there are some notes around this. Found one for export to excel

3483393 - SAC- Export to Excel issue for API on story 2.0 - SAP for Me

N1kh1l
Active Contributor
0 Kudos
Also I see the error mentions at t.finishCSVExport, have you configured it to export as PDF or CSV ?