Where to enter license key while using jsreport.local nuget package?
-
This is how it looks like in my code.
And I got no idea where should I put my license key in there, couldn't find anything in the documentation.
Also another question, should I use jsreport.binary or jsreport.binary.ph2? Is it a newer version?
-
I apologize for the missing information in the docs. I will update it....
In case you purchased enterprise jsreport license you can apply it using configuration file
jsreport.config.json
and property "licenseKey". Or you can also pass the license key directly from c# using the following code.var rs = new LocalReporting() .UseBinary(JsReportBinary.GetBinary()) .Configure(cfg => { cfg.LicenseKey = "xxx-xxx-xxx-xxx"; return cfg; })) .AsUtility() .Create();
The phantomjs 2 binaries supports more modern javascript and css but it is less stable and include some regression bugs. If the default version works for you, there is no reason to use phantomjs v2 version for now.
-
@jan_blaha Thanks for quick answer. Last question.
I tried changing the recipe to something else other than PhantomPdf I always get an exception. (Tried ChromPdf and Wkhtmltopdf)
{
"message": "An error has occurred.",
"exceptionMessage": "Error rendering report: instance has been daemonized and initialized successfully (pid: 8504)rendering has finished with errors:Error: An error occurred while trying to execute the command: at onCriticalError ([eval]:29603:25) at [eval]:29558:13 at tryCatcher ([eval]:36038:23) at Promise._settlePromiseFromHandler ([eval]:34061:31) at Promise._settlePromise ([eval]:34118:18) at Promise._settlePromise0 ([eval]:34163:10) at Promise._settlePromises ([eval]:34238:18) at Async._drainQueue ([eval]:31008:16) at Async._drainQueues ([eval]:31018:10) at Immediate.Async.drainQueues [as _onImmediate] ([eval]:30892:14) at processImmediate [as _immediateCallback] (timers.js:396:17) {"originalError":{"remoteStack":"Error: Recipe 'chrome-pdf' not found\n at jsreportRuntime.js:138917:13\n at tryCatcher (jsreportRuntime.js:47277:23)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45299:31)\n at Promise._settlePromise (jsreportRuntime.js:45356:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45401:10)\n at Promise._settlePromises (jsreportRuntime.js:45480:18)\n at Promise._fulfill (jsreportRuntime.js:45425:18)\n at Promise._resolveCallback (jsreportRuntime.js:45219:57)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45311:17)\n at Promise._settlePromise (jsreportRuntime.js:45356:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45401:10)\n at Promise._settlePromises (jsreportRuntime.js:45480:18)\n at Promise._fulfill (jsreportRuntime.js:45425:18)\n at PromiseArray._resolve (jsreportRuntime.js:45690:19)\n at PromiseArray._promiseFulfilled (jsreportRuntime.js:45708:14)\n at Promise._settlePromise (jsreportRuntime.js:45361:26)\n at Promise._settlePromise0 (jsreportRuntime.js:45401:10)\n at Promise._settlePromises (jsreportRuntime.js:45480:18)\n at Promise._fulfill (jsreportRuntime.js:45425:18)\n at Promise._settlePromise (jsreportRuntime.js:45369:21)\n at Promise._settlePromise0 (jsreportRuntime.js:45401:10)\n at Promise._settlePromises (jsreportRuntime.js:45480:18)\n at Promise._fulfill (jsreportRuntime.js:45425:18)\n at Promise._resolveCallback (jsreportRuntime.js:45241:14)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45311:17)\n at Promise._settlePromise (jsreportRuntime.js:45356:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45401:10)\n at Promise._settlePromises (jsreportRuntime.js:45480:18)\n at Promise._fulfill (jsreportRuntime.js:45425:18)\n at Promise._resolveCallback (jsreportRuntime.js:45219:57)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45311:17)\n at Promise._settlePromise (jsreportRuntime.js:45356:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45401:10)\n at Promise._settlePromises (jsreportRuntime.js:45480:18)\n at Promise._fulfill (jsreportRuntime.js:45425:18)\n at Promise._resolveCallback (jsreportRuntime.js:45219:57)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45311:17)\n at Promise._settlePromise (jsreportRuntime.js:45356:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45401:10)\n at Promise._settlePromises (jsreportRuntime.js:45480:18)\n at Promise._fulfill (jsreportRuntime.js:45425:18)\n at jsreportRuntime.js:44716:21\n at nextTickCallbackWith0Args (node.js:442:9)\n at process._tickCallback (node.js:371:13)"}}(Original) Error: Error during rendering report: Recipe 'chrome-pdf' not found at [eval]:36644:23 at ConcatStream.<anonymous> ([eval]:42366:43) at emitNone (events.js:72:20) at ConcatStream.emit (events.js:166:7) at finishMaybe ([eval]:4229:14) at afterWrite ([eval]:4115:3) at nextTickCallbackWithManyArgs (node.js:486:18) at process._tickCallback (node.js:384:17) {"remoteStack":"Error: Recipe 'chrome-pdf' not found\n at jsreportRuntime.js:138917:13\n at tryCatcher (jsreportRuntime.js:47277:23)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45299:31)\n at Promise._settlePromise (jsreportRuntime.js:45356:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45401:10)\n at Promise._settlePromises (jsreportRuntime.js:45480:18)\n at Promise._fulfill (jsreportRuntime.js:45425:18)\n at Promise._resolveCallback (jsreportRuntime.js:45219:57)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45311:17)\n at Promise._settlePromise (jsreportRuntime.js:45356:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45401:10)\n at Promise._settlePromises (jsreportRuntime.js:45480:18)\n at Promise._fulfill (jsreportRuntime.js:45425:18)\n at PromiseArray._resolve (jsreportRuntime.js:45690:19)\n at PromiseArray._promiseFulfilled (jsreportRuntime.js:45708:14)\n at Promise._settlePromise (jsreportRuntime.js:45361:26)\n at Promise._settlePromise0 (jsreportRuntime.js:45401:10)\n at Promise._settlePromises (jsreportRuntime.js:45480:18)\n at Promise._fulfill (jsreportRuntime.js:45425:18)\n at Promise._settlePromise (jsreportRuntime.js:45369:21)\n at Promise._settlePromise0 (jsreportRuntime.js:45401:10)\n at Promise._settlePromises (jsreportRuntime.js:45480:18)\n at Promise._fulfill (jsreportRuntime.js:45425:18)\n at Promise._resolveCallback (jsreportRuntime.js:45241:14)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45311:17)\n at Promise._settlePromise (jsreportRuntime.js:45356:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45401:10)\n at Promise._settlePromises (jsreportRuntime.js:45480:18)\n at Promise._fulfill (jsreportRuntime.js:45425:18)\n at Promise._resolveCallback (jsreportRuntime.js:45219:57)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45311:17)\n at Promise._settlePromise (jsreportRuntime.js:45356:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45401:10)\n at Promise._settlePromises (jsreportRuntime.js:45480:18)\n at Promise._fulfill (jsreportRuntime.js:45425:18)\n at Promise._resolveCallback (jsreportRuntime.js:45219:57)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45311:17)\n at Promise._settlePromise (jsreportRuntime.js:45356:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45401:10)\n at Promise._settlePromises (jsreportRuntime.js:45480:18)\n at Promise._fulfill (jsreportRuntime.js:45425:18)\n at jsreportRuntime.js:44716:21\n at nextTickCallbackWith0Args (node.js:442:9)\n at process._tickCallback (node.js:371:13)"}",
"exceptionType": "jsreport.Local.JsReportBinaryException"
}Seems like "Recipe 'chrome-pdf' not found" is missing. Do I have to install that?
-
This is mentioned in docs.
https://jsreport.net/learn/dotnet-local#custom-extensionsThe binary includes just default extensions from the jsreport v1. So there is no wkhtmltopdf or chrome.
You can install wkhtmltopdf but chrome won't work with v1 binary.There are pre-release binaries for jsreport.Local jsreport.binary... which includes compiled jsreport v2 version that have the chrome by default.
You can try it out.