|
@@ -578,17 +578,22 @@ module.exports = {
|
|
|
let r_name = rpt_names[idx];
|
|
let r_name = rpt_names[idx];
|
|
|
parallelFunctions.push((function (rpt_id, rpt_name) {
|
|
parallelFunctions.push((function (rpt_id, rpt_name) {
|
|
|
return function (cb) {
|
|
return function (cb) {
|
|
|
- getAllPagesCommon(user_id, prj_id, rpt_id, pageSize, orientation, customizeCfg, dftOption, JV.OUTPUT_TYPE_PDF, function (err, pageRst) {
|
|
|
|
|
- if(err){
|
|
|
|
|
- cb(err);
|
|
|
|
|
- }
|
|
|
|
|
- else{
|
|
|
|
|
- rpt_pdf_util.export_pdf_file(pageRst, pageSize, rpt_name, function(uuidName){
|
|
|
|
|
- let fileRst = {uuid: uuidName, reportName: rpt_name};
|
|
|
|
|
- cb(err, fileRst);
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ getAllPagesCommon(user_id, prj_id, rpt_id, pageSize, orientation, customizeCfg, dftOption, JV.OUTPUT_TYPE_PDF, function (err, pageRst) {
|
|
|
|
|
+ if(err){
|
|
|
|
|
+ cb(err);
|
|
|
|
|
+ }
|
|
|
|
|
+ else{
|
|
|
|
|
+ rpt_pdf_util.export_pdf_file(pageRst, pageSize, rpt_name, function(uuidName){
|
|
|
|
|
+ let fileRst = {uuid: uuidName, reportName: rpt_name};
|
|
|
|
|
+ cb(err, fileRst);
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ } catch (ex) {
|
|
|
|
|
+ console.log(ex);
|
|
|
|
|
+ cb("Occurs exception while creating PDF file!");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
})(parseInt(r_id), r_name));
|
|
})(parseInt(r_id), r_name));
|
|
|
}
|
|
}
|