Excel handlebars calling shared function in asset script file



  • JSReport Forum,

    I have a excel workbook that is uploaded to jsreport hosted env. That workbook uses handlebar notation to populated rows of data. One of the cells calls a shared function that is located in a shared asset file.

    Issue: If the shared asset scope is set to folder the function is not called in the workbook. It only calls the function if the assets scope is global.

    Playground link: https://playground.jsreport.net/w/WadeBenz/q2rvuKWn

    Other Notes: If I export this and then import onto a local instance of jsreport that does not have authentication running. It will work if the asset is not in a subfolder (directly in the data folder). When looking at the log files this is the error that is entered. At the time of running the report I was logged in as an Admin.

    {"_id":"sisL7wX5780zeXRB","timestamp":{"$$date":1725454559501},"state":"error","mode":"standard","creationDate":{"$$date":1725454559510},"modificationDate":{"$$date":1725454561313},"shortid":"wh6DlsE","inheritedReadPermissions":[],"inheritedEditPermissions":[],"$entitySet":"profiles","timeout":180000,"templateShortid":"o9IHrco_s","finishedOn":{"$$date":1725454561245},"error":"Error: Error while executing xlsx recipe\n(because) error when evaluating engine handlebars for template anonymous\n(because) "xlsxSData" helper call failed\n(because) "xlsxSData" helper call failed\n(because) "xlsxSData" helper call failed\n(because) missing helper: "getDateText"\n\n(system-helpers.js line 2006:33)\n\n 2004 | newData.currentCellRef = null\n 2005 |\n> 2006 | const result = optionsToUse.fn(this, { data: newData })\n | ^\n 2007 |\n 2008 | return result\n 2009 | }\n\n(system-helpers.js line 1571:25)\n\n 1569 | newData.outOfLoopTemplates = Object.create(null)\n 1570 |\n> 1571 | return optionsToUse.fn(this, { data: newData })\n | ^\n 1572 | }\n 1573 |\n 1574 | const getLoopItemById = (byTarget, loopItems) => {\n\n","blobName":"path*****/file_ExcelFile/fh79ixtwgaxcdqv.log"}

    I need to have folder scope on the asset, since there are several applications that publish reports to this server.



  • We are working on the fix, it should be part of the upcoming release. However, there is no date yet.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.