Oops. Never mind. Found a typo in my template name. Sorry for the confusion.
jjarrell50
@jjarrell50
Posts made by jjarrell50
-
RE: unable to find specified template or user doesnt have permissions to view
-
RE: unable to find specified template or user doesnt have permissions to view
yes, you do need to run the server part; although, there isn't much there. at this point, the report template is basically hello world. If necessary I could hack it . so you don't need server.
so in the server folder --- npm install, then gulp serve.
net you'll have three processes, client$ ng server, server$ gulp server, and jsreportapp$ node server.jskeep me posted if you need anything. this worked great on a previous gig. i think it will work great here. ;)
-
RE: unable to find specified template or user doesnt have permissions to view
i found your email. i've granted you rights to repo. https://gitlab.com/OldProgrammer.io/PepsiCo/SpireDashboard
in client folder and jsreport app folders run npm install. for client, you need to install angular cli global
npm install @angular/cli -g
the report is at http://localhost:4200/issues. it's hello world at this point.if you have any problems getting set up to run, please let me help.
-
RE: unable to find specified template or user doesnt have permissions to view
it's on gitlab. if you want to share or gitlab id or provide an email, i'll get you an invite.
you can DM me at jeff dot jarrell AT gmail.com
-
RE: unable to find specified template or user doesnt have permissions to view
any thoughts on this? I'd really like to get this into my application.
-
RE: unable to find specified template or user doesnt have permissions to view
I'd be more than happy to open up my gitlab repo if you'd like to see it in context.
code for call to jsreport (typescript)
'// this.dataSpecification.reportTemplate will be the template name in jsreport editor
// recipe is html-with-browser-client
// --- this is called when the data has been gathered for use in the report tool
onDataReady(data: any) {
const self = this ;
console.log(ReportContainer.${self.dataSpecification.reportId}.OnDataReady
, data);if (data.err) { self.errorMessage = data.err ; self.hasError = true ; console.log(`ReportContainer.${self.dataSpecification.reportId}.ERROR`, data); return ; } // build up params const requestParms = { "template": { name: this.dataSpecification.reportTemplate, recipe: this.recipe }, "data": data }; console.log('parms to rptserver', requestParms); // send API call to server this.appInfo.jsreport.renderAsync(requestParms) .then(function (res) { // goood response, attach to the innerHtml of the div (angular's way of grabbing the html element) const mydiv2 = self.rptsection.nativeElement; while (mydiv2.firstChild) { mydiv2.removeChild(mydiv2.firstChild); } // a way to get .innerHTML to have executable script tags const fragment = document.createRange().createContextualFragment(res.toString()); mydiv2.appendChild(fragment); }).catch(function(err){ console.log("Error in jsReport.renderAsync:", err) ; });
}
reporter.log - startup, 1 call to request report
2019-03-09T00:36:58.130Z - info: Initializing jsreport@2.4.0 in development mode using configuration file: jsreport.config.json
2019-03-09T00:36:58.131Z - info: Searching for available extensions in /Users/jeffreyj/_source/SpireDashboard/jsreportapp/
2019-03-09T00:36:58.139Z - info: Extensions location cache contains up to date information, skipping crawling in /Users/jeffreyj/_source/SpireDashboard/jsreportapp/
2019-03-09T00:36:58.145Z - info: Found 31 extensions
2019-03-09T00:36:58.162Z - debug: Writing extension locations cache to /var/folders/gd/ddfpm4xx4gb4rnfl_jr7cyxw0000gn/T/jsreport/core/locations.json
2019-03-09T00:36:58.164Z - debug: Discovered 31 extensions
2019-03-09T00:36:58.438Z - debug: Extension authentication is disabled, skipping
2019-03-09T00:36:58.438Z - info: Using extension cli
2019-03-09T00:36:58.442Z - info: Using extension debug
2019-03-09T00:36:58.444Z - info: Using extension express
2019-03-09T00:36:58.565Z - info: Using extension freeze
2019-03-09T00:36:58.566Z - info: Using extension handlebars
2019-03-09T00:36:58.568Z - info: Using extension import-export
2019-03-09T00:36:58.725Z - info: Using extension jsrender
2019-03-09T00:36:58.725Z - info: Using extension tags
2019-03-09T00:36:58.727Z - info: Using extension templates
2019-03-09T00:36:58.729Z - info: Using extension authorization
2019-03-09T00:36:58.732Z - debug: Extension authorization was disabled
2019-03-09T00:36:58.732Z - info: Using extension base
2019-03-09T00:36:58.733Z - info: Using extension browser-client
2019-03-09T00:36:58.735Z - info: Using extension child-templates
2019-03-09T00:36:58.741Z - info: Using extension chrome-pdf
2019-03-09T00:36:58.814Z - debug: Chrome strategy is dedicated-process
2019-03-09T00:36:58.814Z - info: Using extension data
2019-03-09T00:36:58.815Z - info: Using extension fs-store
2019-03-09T00:36:59.126Z - info: Using extension licensing
2019-03-09T00:36:59.131Z - info: Using extension pdf-utils
2019-03-09T00:36:59.199Z - info: Using extension reports
2019-03-09T00:36:59.203Z - info: Using extension studio
2019-03-09T00:36:59.215Z - debug: studio request logs are enabled (flush interval: 2000)
2019-03-09T00:36:59.215Z - info: Using extension text
2019-03-09T00:36:59.216Z - info: Using extension version-control
2019-03-09T00:36:59.313Z - info: Using extension assets
2019-03-09T00:36:59.320Z - info: Using extension html-to-xlsx
2019-03-09T00:36:59.451Z - info: html-to-xlsx detected chrome as available html engine
2019-03-09T00:36:59.451Z - info: Using extension scheduling
2019-03-09T00:36:59.489Z - info: Using extension scripts
2019-03-09T00:36:59.492Z - info: Using extension xlsx
2019-03-09T00:36:59.582Z - info: Using extension public-templates
2019-03-09T00:36:59.582Z - debug: Extension public-templates was disabled
2019-03-09T00:36:59.583Z - info: Using extension resources
2019-03-09T00:36:59.583Z - info: Using extension sample-template
2019-03-09T00:36:59.588Z - info: fs store is persisting using fs
2019-03-09T00:36:59.588Z - info: fs store is synchronizing using fs
2019-03-09T00:36:59.589Z - info: fs store is loading data
2019-03-09T00:36:59.605Z - debug: fs store sync is configured to use polling for files watcher
2019-03-09T00:36:59.649Z - info: fs store is initialized successfully
2019-03-09T00:36:59.667Z - info: Creating default express app.
2019-03-09T00:36:59.689Z - info: jsreport server successfully started on http port: 5488
2019-03-09T00:36:59.689Z - info: fs store emits sockets to synchronize underlying changes with studio
2019-03-09T00:36:59.706Z - info: Verifying license key free
2019-03-09T00:37:00.174Z - info: Using enterprise trial license
2019-03-09T00:37:00.181Z - info: reporter initialized
2019-03-09T00:37:51.529Z - info: Starting rendering request 1 (user: null)
2019-03-09T00:37:51.532Z - warn: Error when processing render request Unable to find specified template or user doesnt have permissions to read it: R01GitLabIssues Error: Unable to find specified template or user doesnt have permissions to read it: R01GitLabIssues
at module.exports (/Users/jeffreyj/_source/SpireDashboard/jsreportapp/node_modules/jsreport-core/lib/util/createError.js:11:13)
at Reporter.createError (/Users/jeffreyj/_source/SpireDashboard/jsreportapp/node_modules/jsreport-core/lib/reporter.js:265:12)
at AsyncFunction.<anonymous> (/Users/jeffreyj/_source/SpireDashboard/jsreportapp/node_modules/jsreport-templates/lib/templates.js:134:20)
2019-03-09T00:37:51.533Z - warn: Error during processing request at http://localhost:5488/api/report -
RE: unable to find specified template or user doesnt have permissions to view
meant to say, none of my templates have been ported. what's in the jsreportapp folder is just the samples.
-
RE: unable to find specified template or user doesnt have permissions to view
the code I'm porting is client side code, in the browser that does the calling of the report server. I'm confident that my calls are set up ok, given that the same recipes haven't changed.
what's new, is on the server side, where i have a completely new jsreportapp folder with current jsreport files.
-
unable to find specified template or user doesnt have permissions to view
I've got a vanilla install of jsreport rptserver. authenication is not enabled by default. I'm porting old code from a year ago. I don't need authentication.
I'm sure the name of my template is correct. that leaves the user permission issue as a likely culprit. what do I need to do to just open it up.