Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsreport for Razor Pages #11

Open
SwethaYamsani opened this issue Oct 15, 2019 · 3 comments
Open

jsreport for Razor Pages #11

SwethaYamsani opened this issue Oct 15, 2019 · 3 comments

Comments

@SwethaYamsani
Copy link

I get an object reference not set to instance of an object error at below code.
HttpContext.JsReportFeature().Recipe(Recipe.ChromePdf);
return Page();

I am using jsreport to generate a pdf of a razor page not view. Does jsreport works with razor page in asp.net core application?

@pofider
Copy link
Contributor

pofider commented Oct 15, 2019

Some info here
https://forum.jsreport.net/topic/692/httpcontext-jsreportfeature-returns-null/4

I welcome would welcome a contribution to this topic.

@SwethaYamsani
Copy link
Author

I did a just simple razor pages .net core application and was able to get pdf using the above code. I just has two string fileds in the page. But when it comes to my actual application, i get the above error. Does that mean jsreport works for Razor pages ?

@SwethaYamsani
Copy link
Author

I get this error in actual application...
JsReportBinaryException: Error rendering report: A critical error occurred while trying to execute the render command: An error occurred while trying to start daemonized process: An error has occurred when trying to initialize jsreport, seems like there is already a server running in port: 5488 (2). listen EADDRINUSE :::5488 (1). caused by error (2) -> meta = {"code":"EADDRINUSE"}, stack = Error: at instance.init.then.catch ([eval]:66283:29) at tryCatcher (jsreportRuntime.js:158306:23) at Promise._settlePromiseFromHandler (jsreportRuntime.js:157998:31) at Promise._settlePromise (jsreportRuntime.js:158055:18) at Promise._settlePromise0 (jsreportRuntime.js:158100:10) at Promise._settlePromises (jsreportRuntime.js:158176:18) at _drainQueueStep (jsreportRuntime.js:39442:12) at _drainQueue (jsreportRuntime.js:39435:9) at Async._drainQueues (jsreportRuntime.js:39451:5) at Immediate.Async.drainQueues (jsreportRuntime.js:39321:14) at runCallback (timers.js:794:20) at tryOnImmediate (timers.js:752:5) at processImmediate [as _immediateCallback] (timers.js:729:5)caused by error (1) -> meta = {"code":"EADDRINUSE","errno":"EADDRINUSE","syscall":"listen","address":"::","port":5488}, stack = Error: at Object._errnoException (util.js:1022:11) at _exceptionWithHostPort (util.js:1044:20) at Server.setupListenHandle [as _listen2] (net.js:1367:14) at listenInCluster (net.js:1408:12) at Server.listen (net.js:1492:7) at Promise (jsreportRuntime.js:182856:12) at Promise._execute (jsreportRuntime.js:40237:9) at Promise._resolveFromExecutor (jsreportRuntime.js:157969:18) at new Promise (jsreportRuntime.js:157565:10) at startAsync (jsreportRuntime.js:182850:10) at steps.push (jsreportRuntime.js:182884:14) at Object.start (jsreportRuntime.js:182958:13) at Object.reporter.initializeListeners.add (jsreportRuntime.js:183141:30) at (1). caused by error (1) -> meta = {"code":"EADDRINUSE"}, stack = Error: at exports.NsSocket.socket.dataOnce ([eval]:66671:25) at exports.NsSocket.listener ([eval]:13402:10) at exports.NsSocket.EventEmitter.emit ([eval]:13490:22) at exports.NsSocket._onData ([eval]:94250:8) at Lazy. ([eval]:74361:13) at Lazy. ([eval]:74343:19) at emitTwo (events.js:126:13) at Lazy.emit (events.js:214:7) at Lazy. ([eval]:74344:22) at emitOne (events.js:116:13) at Lazy.emit (events.js:211:7) at yieldTo ([eval]:74451:18) at Function. ([eval]:74489:27) at Lazy. ([eval]:74457:21) at emitOne (events.js:116:13) at Lazy.emit (events.js:211:7)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants