From 98d033abf0fa6c3358049ac34225cafb672754ea Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 20 Aug 2020 22:17:50 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 72 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 130bc5dc..e4dd0137 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -4,7 +4,69 @@ REPORTING -Procedure: + +DESIGN +Users will be able to design report templates inside AyaNova (unless it doesn't seperate as a bundle and bloats too much then maybe as an external app) + +This is the jsreport designer libs used for reference: https://github.com/jsreport/jsreport-studio/blob/master/package.json + +I will use the Monaco editor which is what vscode uses, here is a Vue wrapper: + https://github.com/egoist/vue-monaco + + +RENDER +Going to need to render at the server, possibly from data passed from teh client to the server or generated AT the server in the case of notification deliver reports + (Localization is a "black hole" issue if rendered AT the server) + +JSReport renders at server and returns result to client, the API docs show pretty clearly how this happens: + https://jsreport.net/learn/api + Note that the api docs also give some ideas as to how I should structure my api + +HTML -> PDF + Headless Chrome + jsreport uses headless chrome by default which has built in pdf from html ability. + they use a NODE library Puppeteer for it, but there is a c# wrapper for .net core linux windows mac: https://github.com/hardkoded/puppeteer-sharp + some kind of example that may be relevant: https://github.com/kblok/netconfar-puppeteer-sharp-demo/blob/master/hacking-the-browser-api/Controllers/MediumController.cs#L13 + Maybe not the only one for c# core, need to dig around + Issues: + Issue with header / footer not being settable apparently which is a big breaking issue for many biz reports usage + someone said that another pdf tool can be used to set those post processing but fuckery abounds + other solutions below apparently don't have this issue. + Even jsreport has listed workarounds and tools to resolve this + + There seem to be many potential issues with missing libraries, rights and sandbox and etc etc etc on linux + + These things kind of turned me off this a bit, it's not plug and play and simple + + WeasyPrint + https://github.com/Kozea/WeasyPrint + + + wkhtmltopdf + https://wkhtmltopdf.org/downloads.html + Well used, old but likely enough for our purposes + +TEMPLATE ENGINE + Handlebars by default for jsreport which is easy peasy to work with + + +Render outputs + JSReport renders to different outputs, they call it recipes https://jsreport.net/learn/recipes + HTML - just outputs as html for viewing in the browser / printing from browser + PDF: https://jsreport.net/learn/pdf-recipes + Outputs 5 different pdf converters because they all support different feature sets which is ominous + +"BLACK HOLES" + How to localize same as client but at server for dates and currency etc + maybe if it's rendering via a headless chrome can just pass the locale strings from the client browser or something along those lines + maybe since it's all one user generally in same zone they can just stick with one format for all reports? + + Can I render at the client for some things or better to just go all server? + Does client send data back to server for render or ...? +=-=-=-=- + + +Research procedure: REQUIREMENTS Look at existing reports in v7 and generalize them and the features provided that are used pdf, email, print, download @@ -68,6 +130,14 @@ Procedure: JSREPORT https://playground.jsreport.net/w/admin/dI2_fUqZ + + + + + + + + todo: from reporting specs doc, not vetted, was written a while ago: - All v7 reports ported to RAVEN - ALL Fields even the ones that don't show on the report but are available for adding to a report in the editor need to be available