jsreport
jsreport copied to clipboard
Queryable Metadata
Is there a way we can attach metadata to a template in the studio, for instance a JSON object, so when we call the API we can parse the metadata and use that to formulate subsequent requests? I need to consume the reports from both desktop and web applications. This would help tremendously in building a smarter reporting interface.
On further thought, and to simplify, something like a new metadata entity to attach to a template that can be returned in the API, just like report sample data but returnable via API calls.
For the time being i'm just going to use a naming convention on a data entity for a separate schema to parse for the report metadata
hi! can you describe your specific case in which having this feature will help you? i mean, you can try to describe the case with more real example, like what kind of requests are you planning to do next when getting the metadata of template. try to describe the steps you plan to do with the metadata, since the beginning to the end. it will help us a lot to understand if this feature is something that is really missed or maybe that it can be solved differently.
so far it seems that the resources can be used to solve this, since it stores data to a template and that data can be retrieved when querying the template from API call, but maybe you found something that it is missing there or some functionality there is not enough to solve your case, in any case let us know what you think about your specific case and if the resources it enough or not to solve it.
I'll try to describe this the best I can. So for instance I want to associate a json schema metadata entity to a template much like react-jsonschema-form so that when i change a report in the studio i can update the schema to reflect required user input parameters. My client applications (web and wpf) build their forms to request the report from this metadata. This will allow dynamic forms for our report engine without recompilation. I'm currently handling report configuration is a much more involved way with our database and a configuration screen. This metadata entity would put everything in one place and remove an entire step and concern for my users/staff to maintain reports.
On what you mentioned and I asked in the forum, i think resources may provide this ability. Though as for efficiency or simplicity i think an extension to add a custom entity that is returned with the template call could reduce the number of api calls required to build the form from the metadata using the resource method.