1

Problem report/exec_report in node.js

Тема: Problem report/exec_report in node.js

I am working with Remote Api and node.js.
I get with core / search_items the resource the report id, but when executing report / exec_report it says "Error: 7"
Is the token wrong? Are the steps I'm doing wrong?

Note: I create the token using the playndground.

2

Problem report/exec_report in node.js

(18/10/2018 23:34:20 отредактировано cerpas)

Re: Problem report/exec_report in node.js

Hello Gab

Please show your request report/ecex_report

Best regards

CC

3

Problem report/exec_report in node.js

Re: Problem report/exec_report in node.js

Hello cerpas. I leave you the code of report / exec_report

    
                        var params = {
                        "reportResourceId":8,
                        "reportTemplateId":0,
                        "reportObjectId":18112304,
                        "reportObjectSecId":0,
                        "interval":{
                            "from":0,
                            "to":0,
                            "flags":0
                        }
                        };
                        request.post({
                            url: URL + 'svc=report/exec_report',
                            json: true,
                            form: {
                                sid: SID,
                                params: JSON.stringify(params)
                            }
                        }, function (error, response, body) {
                            console.log(body);
                            console.log(namecan);
                    });
                    }

Tells me error 7 with any reporting function of the SDK.

4

Problem report/exec_report in node.js

Re: Problem report/exec_report in node.js

"reportResourceId":8,
"reportTemplateId":0,

You need to specify correct resource id and report template id.

Also, if reportTemplateId = 0 is specified, it means, that you need to pass reportTemplate .

5

Problem report/exec_report in node.js

Re: Problem report/exec_report in node.js

thanks, the problem was the user permissions from which the token generated.