We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Server side solution for generating ODF reports

00:00

Formal Metadata

Title
Server side solution for generating ODF reports
Subtitle
An important step to adopt ODF in Taiwan
Title of Series
Number of Parts
561
Author
License
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
The National Development Council in Taiwan have asked the OSSII, a local LibreOffice service provider, to develop a solution that can directly generate ODF reports, while the servers in public administrations do not need to change a lot. To adopt ODF and LibreOffice in Taiwan, a very important part, besides desktop applications, is to ask the reports generated from servers in all the public administrations to be in ODF format. Currently almost all reports are in Microsoft office format; some of them are even non-standard -- they can be opened by Microsoft Excel, but can not be converted by LibreOffice. Hence, the National Development Council asked the OSSII, a local LibreOffice service provider, to develop a solution that can directly generate ODF reports, while the server side do not need to change a lot. This talk gives a simple introduction of how this solution works.
Server (computing)Computer animation
Text editorOpen setLimit (category theory)Server (computing)WhiteboardSoftwareAssociative propertyFinite element methodGoodness of fitBit rateArithmetic progressionComputer animation
Open sourceFile formatCASE <Informatik>Video gameObservational studyDemo (music)Computer animation
Client (computing)System administratorModul <Datentyp>Web pageExplosionFile formatGroup actionReading (process)Zoom lensRow (database)Formal grammarFile formatServer (computing)Computer fileTraffic reportingModule (mathematics)Electric generatorEmailDerivation (linguistics)DatabaseInformation systemsWeb pageDataflowExecution unitNP-hardTheory of relativityoutputComputer programmingCategory of beingOffice suiteArithmetic meanArchaeological field surveyComputer animationLecture/Conference
Computer iconRegulärer Ausdruck <Textverarbeitung>Web pagePoint cloudPhysical systemLemma (mathematics)SyntaxbaumSample (statistics)Computer fileExtension (kinesiology)Traffic reportingOffice suiteComputer animation
Point cloudSigma-algebraMaxima and minimaOvalTraffic reportingComputer fileContent (media)Computer animation
Menu (computing)Execution unitEmailFile formatPhysical systemDifferent (Kate Ryan album)System programmingServer (computing)Revision controlSingle-precision floating-point formatSoftware maintenanceData structureVariable (mathematics)Content (media)Abstract rewriting systemComputer-generated imagerySource codeRepresentational state transferTemplate (C++)Open setDemo (music)Computer fileArithmetic meanServer (computing)3 (number)Traffic reportingMathematicsModule (mathematics)Digital photographyOffice suiteDifferent (Kate Ryan album)Revision controlDynamical systemUniform resource locatorExecution unitSoftware developerDemo (music)MultiplicationDressing (medical)System administratorField (computer science)Electric generatorFile formatMedical imagingContent (media)Standard deviationVirtual machineGame theoryOpen set2 (number)Directory serviceRow (database)Representational state transferDirection (geometry)System callData conversionPhysical systemComputer animation
Demo (music)Server (computing)Template (C++)Extension (kinesiology)ExplosionDiscrete element methodMomentumSimulationIcosahedronFile viewerMathematicsEmulationEmail8 (number)Office suiteLink (knot theory)DemonTraffic reportingDemo (music)Cartesian coordinate systemField (computer science)Template (C++)Category of beingDerivation (linguistics)Table (information)Computer fileSystem administratorRevision controlDifferent (Kate Ryan album)Audio file formatOcean currentDemosceneOffice suitePhysical systemOpen sourceResolvent formalismCuboidComputer animation
Maxima and minimaDemo (music)Shape (magazine)10 (number)User-defined functionDependent and independent variablesTemplate (C++)Uniform resource locatorPhysical systemField (computer science)Electric generatorServer (computing)Function (mathematics)File formatDemo (music)Traffic reportingArrow of timeComputer animation
InformationSample (statistics)Self-organizationServer (computing)BootingBit error rateDefault (computer science)Tape driveDependent and independent variablesMaxima and minimaGamma functionPerpetual motionMenu (computing)Content (media)Uniform resource locatorCodeBlock (periodic table)Probability density functionTraffic reportingMultiplication signCodeRevision controlServer (computing)NumberUniform resource locatorRight angleBeta functionError messageFile formatComputer animation
GezeitenkraftServer (computing)CodeGamma functionPoint cloudMaxima and minimaWeb pageMenu (computing)ExplosionTemplate (C++)Demo (music)Dependent and independent variablesTraffic reportingUniform resource locatorServer (computing)Computer animation
Computer fileTraffic reportingComputer animation
ExplosionTemplate (C++)Demo (music)Multiplication signWitt algebraServer (computing)Uniform resource locatorFunction (mathematics)Online helpField (computer science)Template (C++)DataflowExecution unitServer (computing)Computer animation
Video game consoleFirefox <Programm>Dependent and independent variablesUniform resource locatorCodeServer (computing)Template (C++)Formal languageModule (mathematics)Observational studyElectric generatorServer (computing)Programming languageComputer fileModule (mathematics)Standard deviationTraffic reportingExtension (kinesiology)Negative numberUniform resource locatorTemplate (C++)DataflowSystem administratorAudio file formatElectric generatorSpezielle orthogonale GruppeFlock (web browser)Field (computer science)Multiplication signDirection (geometry)Bit rateCentralizer and normalizerMereologyComputer animation
IcosahedronDemo (music)CodeEndliche ModelltheorieUniform resource locatorField (computer science)MathematicsTotal S.A.Computer animation
Server (computing)Observational studyElectric generatorTemplate (C++)CodeTraffic reportingCodePatch (Unix)Demo (music)MereologyElectric generatorFile formatComputer fileOpen sourceServer (computing)Computer animation
Computer animation
Transcript: English(auto-generated)
I give you the microphone. No, no.
Okay, I'm Franklin from Taiwan.
Recently, recent years, we have huge progress about adopting ODF and also LibreOffice in Taiwan.
But because this is not the topic of today's talk, so if you are interested in Taiwan's story, just a few days before the join of the OSOR, they had a case study of Taiwanese government,
how to do that and what we have done and what's our thoughts. So I recommend you to read this one about how we have done in Taiwan. And today, I'm going to live demo you another problem we need to solve.
During this year, we find another problem because what we have done so far is about crime. That means the users use LibreOffice or use our derivatives from LibreOffice to generate ODF files and attach it
in the mail or official document. But there is still another problem is here. Usually, it will be from the server because always, we have many servers, many servers that need to generate the reports.
And this is the current flow. So in an agency, a user needs to generate a report from the server and send it to another unit. He will say, oh, I want this and that report and send this request to who?
To CCLD Min. He manages the servers, but the user does not generate the report himself. He requires the CCLD Min to have, which manage many servers because most of the databases are here, so they will need to generate here.
And each server needs a module, a dedicated module to generate this report. That's because of a license issue. And then later, I'll tell you what kind of report it generates and what is the module in the next page.
Almost all, maybe not all, but almost all of the module that would need to be integrated into the information system is this. It's called the CRISPR. I don't know if any of you know this.
It will just get some input and generate a report to you. But this CRISPR report, if we see what file format it export, it will find that no ODF.
So now, our users in our agency face a problem because our service does not generate ODF format report, but they are asked to send reports and any attachments in ODF.
So can I directly convert it? Most of it will be saved as Microsoft format. Maybe DOC, maybe DOCX, maybe XLS.
But if we directly open it in LibreOffice, that would be like this. I can directly left it to you. This file is a typical crystal report, generated report.
And if we directly open, you can see that the file extension is DOC, right? But if we open it with LibreOffice, it will become like this. Here is the content, but you will see a lot of strange comments.
Here, here, a lot. And something is wrong, anything. And if you really see what it is, you find out that actually it is HTML.
So that means the crystal report generates files in HTML but name it in DOC or in SOS. And amazingly, that Microsoft Word and Excel
can open it correctly. But in LibreOffice, we have problem. It's not easy to directly convert such kind of DOC or XLS to ODF or ODF. So this is the screenshot.
Okay, actually, it is an HTML file. Besides this converting problem, there are also other annoying problem like this. First, you can see that almost all the servers, almost all the server needs one module installed here.
But we have many public agencies, different counties, cities, so many different units. They may use different version of crystal report and they may generate different version of format. Okay, that's one of the problem.
It's difficult to integrate with each other because it has no standard. The second is that each single server needs to install one crystal report. It's because of license issue. So if we have 10 servers managed to generate reports,
we need to have 10 modules integrate into those. Maybe there are different servers, different service on those servers, but each one will need to integrate once. Okay, so it's also difficult to manage
so many different servers or difficult to integrate them together. So, okay, then some developers in the government will say, okay, if so, let us generate ODF directly. So they would do that this way.
They would create a standard ODF like ODT and put everything inside. But then what they need to do? When they need to generate report, they need to extract this ODT and find the content they want to replace
in many XML texts. And then repress it, pack it back. What if the layout or the fields changes? So all this work needs to do again. So this is also a pain for those system domains
to directly generate ODF report because it should be multiple data, dynamic data, but they can only generate one, let's say one template, but they need to change, repress the data with inside XML text and then pack back.
So from last year, our National Development Council, that's the main unit that's responsible for promoting ODF and making it the nation's policy.
So they ask our local developers, company named OSI, they do the service from open office to developer office. It's more than 10 years. So we all are together to promote ODF in Taiwan.
So they ask them to develop this, we'll call it NDC ODF API service. Okay, now let me show you. The steps to generate report is very simple. The first one is to build a server. I will show you step by step and the live demo to you later.
Okay, we just need to create a server first and to create a report template. The second step, I will tell you, this will be done by the user, not CSATMIM. And upload to this server and get a RESTful API. Then what the server needs to do is only
to send a URL, send a URI, calling the server's API to generate with data and the report will be generated. Okay, the first, we can see, create a server, we have put it on GitHub. So you can find it in the GitHub.
You find NDC ODF and here's API service. Then we have a demo server here. This one is the demo server built on our NDC office. The machine room, okay.
So this is a demo. Of course, it has to log in. You can have different account and credentials. So let me log in again.
Okay, this is the first. We have already built a service. Then the second step is to create a report. Now I will direct a demo.
This one is LibreOffice derivations. It is custom by LibreOffice 5.2.7 and this NDC ODF application tool. The target of this is very simple because many users in the public agencies,
they have no idea which version of LibreOffice they want to use and they have no idea what is free software. So we just tell them, if you, now you need to generate ODF files, you just use this. And last, in 2017, the ODF process, I also tested that.
So this is currently in government. This is the most useful of this. And we have a tool. This is the wizard to generate the templates. So it's simple to generate it. Let's start demo report template.
And always remember to use the style. Then here, we put many fields, data fields inside it. The field, the name of the field can be in Chinese.
And here are the different kind of fields. Okay, then we have a field here. And because this template is created by users, but they need to let the admin know what it is. So sometimes we will add some comments here.
Okay, and then let's put a date here. Then we put a table.
Okay, we put field name here. Sorry.
Also we have the checkbox. Okay, so if it is, we can say if this report is credential or not, okay.
Then, this is a demo template, but sometimes we need some fields we need to be repeated. So we choose this field and then put here. This is repeatable.
Okay, then the simple template is generated. We save it as OTT template. Demo report template.
Okay. After saving it, we can close that. And then, back to this system, I just need to upload this. Demo report for hosting. And this is the category in the government.
There may be many different category of reports, right? Then we upload it OTT file. After uploading it, here, it's here. And you can see this is a JSON format example.
This is YAML format example. And if we click this, you can see this. This is the API URL. So just copy that. And here are the example format of demo report.
JSON and YAML. So we copy it. Now, we upload. And then we use swagger.io to simulate the server-side behavior.
It's here. In this, the API we just generated, it follows a spec named open API spec. I'm not sure if it's version two or version three, but we follow that spec. Okay, and now, this one is to simulate.
The one we just copied, the URL we just copied, right? And then now we want to get API. It's probe. Then we can find, we have some method, get or post.
The post is, you can post data with JSON format. So here we set it to JSON. And then now we can try. This is the report generator. And this is the generator day.
And the credential or not, maybe false. Okay, here are the username. CTE, sorry.
And this is phone number. And then we can have repeatable data, right? Here is repeatable. So we can copy that and generate the second and the third. Okay, we say ODF-ROS.
This is Russell. Okay, and the third one is,
the brofist-rocks2, okay. So we added the data and then we execute it.
That means we just sent this post request. Execute it. Then you can see this. This is exactly what he sent, for the service I sent. Okay, and oh, JSON data error, sorry, wait.
JSON data error. Oh, here, again. Okay, the code is, okay, the code.
And the URL is here. And we can try, download it. This time we download it as ODT because it's generated report. So here is the generated report.
Just it. So we just, because we have the URL here, so actually from the server side, what you need to do is only, when you need to generate report, you just need to send this out.
Let us save it as another ODT file. We'll just use command line to send it out. And then it can be generated too.
That's it. Okay, so let's get back here. And really it's done. It's very simple. And the flow now becomes like this. When the users, the unit in the government
needs to generate ODF reports, the first thing is that they can generate template themselves because only them knows what they want. And with the help of our template reader, and they can put fields here and there. And then after generating the templates,
it just upload the template to the ODF API server. Just like what you see here. Here, right? And it will generate the API that you need to call.
And it will generate the API. Who needs to know the API? Only the seed admin needs to know. And now, this time, they don't need to install any other module in their servers. All they want is just to send a URL.
You see URL or .wget to send the positive data. So, you just call the API and fill the data, and it will generate the ODF file that it can directly send to the user. It's true, standard ODF files.
Okay, so the whole flow becomes very simple and they don't need to worry about, we need to install so many modules. So, the advantages is very obvious. The first thing, of course, the server side does not need to rewrite
the whole file report generating module. Now, it's used CRISPR report and only generated HTML file with DOC extension. But then, now they don't need to rewrite anything.
They just need to call the API. And actually, for the server side, does not matter which programming language it use to create this server. Sometimes they will say, I will have the module, but I'm written in Ruby, but this server is written in C++.
I don't know how to integrate them together. No, this time, because we only just require HTTP, so it does not matter how to generate the server, the original server. Also, the server does not need to maintain or generate, upgrade the tools,
and if any of the templates needs to update, you have new and you need to change some fields, you just need to, here is the model file, and you just need to upload it again. And it will create a new API,
and you just call with new API, that's all. So no one would need to worry about the file, the data fields or the layout changes. It's just created by user and tell the, and I mean, I update these templates. Okay, they just need to replace the URL.
So everything will be defined in the report templates, which really use this report, okay? So I think this one is very important tool, especially for adopting ODF in government,
because actually report generation is an important part in the government, and right now they are still all in a non-standard Microsoft file format. And this tool will be online this year,
and the code is here. We have open source here, so everyone can build your own server and try, and of course, pictures are welcome. Okay, that's my demo. So, okay, if anyone have question,
but please speak slowly, okay? Okay? So, do we have any question? Mm-hmm.
Uh, yeah, of course. The dream of me is in Chinese, but I think it's easy for you to understand that, so far. Yeah, but of course, maybe, because we are, we do it for Taiwanese government, but of course, we can try to make it international,
and then maybe it's everyone who is interested, you can have to send patches. Yeah, of course. Okay? No question, then. Thank you.