when adding a new report in vs2015 after install .Net embedded I have this error
please help me
thanks for your support
when adding a new report in vs2015 after install .Net embedded I have this error
please help me
thanks for your support
I start to use the.Net embedded server in visual studio 2015 when pressing the preview button have the following error
any one help me
thanks it working fine
I need your support to install theJSreport in VScode
hi bjrmatos,
thanks for your support, this is post method and I will try it and feed you
I am using JSreport Studio
HTML Code
<!--
Custom server side script is used to fetch data from the remote REST API server,
handlebars to render html and phantom-pdf recipe to convert html into pdf.
The template also uses helper function toJSON defined in global helpers asset.
It requires allowed http module in scripts in the configuration file:
"scripts": { "allowedModules": ["http"] }
!-->
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link rel="stylesheet" href="https://cdn.rawgit.com/olton/Metro-UI-CSS/master/build/css/metro.min.css">
<script src='https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.6/Chart.min.js'></script>
</head>
<body>
<h1>{{title}}</h1>
<canvas id='Doctors' style="margin-top:30px"></canvas>
<table class="table striped">
<thead>
<tr>
<th>Outstanding</th>
<th>DoctorID</th>
<th>DoctorLName</th>
<th>DoctorName</th>
</tr>
</thead>
<tbody>
{{#each doctors}}
<tr>
<td>{{Outstanding}}</td>
<td>{{BranchId}}</td>
<td>{{BranchName}}</td>
<td>{{OutstandingPatient}}</td>
</tr>
{{/each}}
</tbody>
</table>
<script>
var data = {{{toJSON this}}}
</script>
</body>
</html>
the script code
function beforeRender(req, res, done) {
// the report parameter country can be send from the client API request
req.data.title = req.data.title || 'Doc'
require('request')({
url:"http://localhost:7458/api/Report/GetdailyTransaction",
method: "POST",
json:true,
headers: {'User-Agent':'Super Agent/0.0.1','content-type': 'application/json','Content-Length': 92},
body: JSON.stringify({"From_Date":"2017-01-23T18:25:43.511Z","To_Date":"2017-06-07T18:25:43.511Z","BranchID":[1]})
}, function(err, res, body){
//request.template.data.orders = json.value;
req.data.doctors = body;
done();
});
}
no error but no data showing in HTML, I test the api from fiddler return result and also i test the above code with Get method working fine
yes I am restart jsreport after changing the config
dev.config
{
"certificate": {
"key": "certificates/jsreport.net.key",
"cert": "certificates/jsreport.net.cert"
},
"authentication": {
"cookieSession": {
"secret": "<your strong secret>"
},
"admin": {
"username": "admin",
"password": "password"
},
"enabled": false
},
"connectionString": {
"name": "fs"
},
"httpPort": 5488,
"httpsPort": null,
"logger": {
"console": {
"transport": "console",
"level": "debug"
},
"file": {
"transport": "file",
"level": "info",
"filename": "logs/reporter.log"
},
"error": {
"transport": "file",
"level": "error",
"filename": "logs/error.log"
}
},
"blobStorage": "fileSystem",
"phantom": {
"strategy": "dedicated-process",
"timeout": 60000
},
"tasks": {
"strategy": "dedicated-process",
"timeout": 10000000,
"allowedModules": ""
},
"scripts": {
"allowedModules": "",
"timeout": 10000000
},
"sample-template": {
"createSamples": true
}
}
still, I have the same error
Error occured - Error during rendering report: Unsupported module in scripts: http. To enable require on particular module, you need to update the configuration as {"scripts": { "allowedModules": ["http"] } } ... Alternatively you can also set "" to allowedModules to enable everything
Stak - Error: Unsupported module in scripts: http. To enable require on particular module, you need to update the configuration as {"scripts": { "allowedModules": ["http"] } } ... Alternatively you can also set "" to allowedModules to enable everything
at _require (C:\jsreport\node_modules\jsreport-scripts\lib\scriptEvalChild.js:44:11)
at evalmachine.<anonymous>:2:12
at ContextifyScript.Script.runInContext (vm.js:35:29)
at ContextifyScript.Script.runInNewContext (vm.js:41:15)
at Object.runInNewContext (vm.js:93:38)
at module.exports (C:\jsreport\node_modules\jsreport-scripts\lib\scriptEvalChild.js:123:6)
at process.<anonymous> (C:\jsreport\node_modules\script-manager\lib\worker-processes.js:48:36)
at emitTwo (events.js:106:13)
at process.emit (events.js:191:7)
at process.nextTick (internal/child_process.js:758:12)
Thanks I found it in https://jsreport.net/learn/scripts#api
hi everybody
I start working with JSreport and I need an example for calling web API URL Get and Post with body request
Thanks
any update on the error below
Error occured - Error during rendering report: Unsupported module in scripts: request. To enable require on particular module, you need to update the configuration as {"scripts": { "allowedModules": ["request"] } } ... Alternatively you can also set "" to allowedModules to enable everything
Stak - Error: Unsupported module in scripts: request. To enable require on particular module, you need to update the configuration as {"scripts": { "allowedModules": ["request"] } } ... Alternatively you can also set "" to allowedModules to enable everything
at _require (C:\WINDOWS\system32\node_modules\jsreport-scripts\lib\scriptEvalChild.js:44:11)
at evalmachine.<anonymous>:1:18
at ContextifyScript.Script.runInContext (vm.js:35:29)
at ContextifyScript.Script.runInNewContext (vm.js:41:15)
at Object.runInNewContext (vm.js:93:38)
at module.exports (C:\WINDOWS\system32\node_modules\jsreport-scripts\lib\scriptEvalChild.js:123:6)
at process.<anonymous> (C:\WINDOWS\system32\node_modules\script-manager\lib\worker-processes.js:48:36)
at emitTwo (events.js:106:13)
at process.emit (events.js:191:7)
at process.nextTick (internal/child_process.js:758:12)
I am update "allowedModules": "*" and still not working
still not working
"tasks": {
"strategy": "in-process",
"timeout": 10000,
"allowedModules": ""
},
"scripts": {
"allowedModules": "",
"timeout": 60000
},
I have the below error
An error occurred - Error during rendering report: an Unsupported module in scripts: request. To enable require on particular module, you need to update the configuration as {"scripts": { "allowedModules": ["request"] } } ... Alternatively, you can also set "*" to allowedModules to enable everything
Also, I am already updating the [dev|prod] configuration file as the following:-
"tasks": {
"strategy": "in-process",
"timeout": 10000,
"allowedModules": ""
},
"scripts": {
"allowedModules": "",
"timeout": 60000
},
hi everybody
when using command"jsreport start"
i have this error
error: Error when starting http server on port 5488 Error: listen EADDRINUSE :::5488