Welcome!

Microservices Expo Authors: Stackify Blog, Elizabeth White, Pat Romanski, Liz McMillan, Yeshim Deniz

Related Topics: Microservices Expo, @CloudExpo

Microservices Expo: Blog Post

Reports? Docx the Solution

You can create report templates in docx format with a simple word processor...

Reports creation is a common problem to face with, when developing web applications. When designing a report, usually a tool is needed to define the report content and the usage of such tools is not always easy and intuitive. Consequently, specific skills and expertise are required in order to use these products.

The same problem arose also with a Rapid Application Development tool like 4WS.Platform, a product designed specifically to speed up and make it easier the creation of web and mobile applications, having an high level of customization and allowing the creation of applications to  users having basic skills.

Which solution can be provided to users in order to make it easy and fast the creation of reports within 4WS.Platform? How to do that in a similar simple way already available in that product for other tasks?

Word processors like Microsoft WordTM[1], Open Office o Libre Office are widespread solutions whose usage is easy and well known by a large amount of users. People know how to use them, for instance to write a letter, compile a bill, an essay or to create a resume, etc.

Why don't exploit the knowledge of these editors that everyone has and start from that?

These editors procude documents in a docx format, which is based on an XML descriptor easily readable by 4WS.Platform.

The widespread of these tools, the semplicity in the creation of documents and the chance to exploit the XML format behind the scenes easily readable are the main reasons for the adoption of the docx format to use for the document template within 4WS.Platform for the reports generation.

In this way, any user can create document templates using these popular editors, format and organize data as they wish and follow simple rules to create a model to populate and finally publish them inside 4WS.Platform to generate reports.

How to create a docx template
As described in the introduction, a user can create his own template by following a few simple rules, but first of all, he can fill in the template, format the content, define the content layout and focus mainly on the result he wants to reach.

Once defined the "static" content and layout of the template, the user has to focus on the "dynamic" parts of the document, which will be replaced with data provided by the application, when generating the report starting from the template.
Finally, when the template has been deployed within 4WS.Platform, queries have to be defined to feed the report for those parts.

Variables
Two kinds of variables written in the docx template are supported by 4WS.Platform. These variables have the following syntax:

4WS.Platform - Modello Docx

  1. <control>value</control>
    the value will be replaced with data retrieved through the execution of the query linked to that part of the template
  2. <translation>description</translation>
    the description will be replaced with data coming from the query execution and translated according to the language used when generating to the report.

The result is reported in the following images.

4WS.Platform - Report

Subreport
In addition to what just described, two types of subreports are supported by 4WS.Platform:

  • a ‘table subreport' used to show a list of records
  • a ‘form subreport', used to show values coming for a single report.

These two subreports have the following syntax:

  1. <table>table</table>
    where ‘table' is the name assigned to the ‘table subreport', in order to identify it and, for each column of that subreport, an identifier having this syntax:<td>column1</td> <td>column2</td> ...It is always possible to include cells whose content is translated according to the report language, using the tag: ‘tdtranslation‘.
    All cells having <td> tag will be replicated for each record read through the execution of query linked to that subreport.
    Here it is an example of the result of such a kind of subreport.
  2. <subform>subform</subform>
    where subform is the name assigned to the subreport and whose controls are identified by ‘subcontrol' tags or ‘subcontroltranslation' tags, in case of data to translate according to the report language.

How to feed the template
Once the user has defined the template, a query has to be written to provide data to show in the report and for each subreport.

4WS.Platform provides several ways to define those queries, through what is called a ‘business component': the user can define the SQL query manually or use the automatic query composition provided by the 4WS.Platform feature.

How to configure a report
When the user has defined the template and the queries to feed it, the next step is to configure the report within the "Web Designer" component of 4WS.Platform.

In order to complete the template configuration and make it possible to generate a report, 4 simple steps are needed:

1. Uploading the template
The first step includes the name specification for the report and the selection of a business component to link to the report in order to fill in the main section of the report.

Through this feature, the user can choose the docx template file to upload: it is possible to upload a different file for each language, with the constraint that each of these templates have to share the same structure, so that it is possible to fill in each of them with the same data structure.

4WS.Platform - Report inserimento nuovo modello

2. Parameters
The report content could depend on data passed in input to that report. That means that the single SQL query could have variables which should be filled with dynamic data. For each of these variables a parameter can be defined along with the other settings provided when defining the report. These parameters have a data type which can be: text, number or date. They can be used when mapping SQL query variables with ad hoc data.

4WS.Platform  - Report parametri

3. Report fields
Once uploaded the docx template, the file is analyzed and a grid is prompted to the user, showing the fields found inside the template that require a mapping, that is to say, to map to the query fields, in order to fill them in.

For each of these bindings, it is possible to define a predefined data format (text, date, integer, decimal, etc.) or take advantage of advanced formatting methods provided by 4WS.Platform.

In the screenshot reported below, a function named ‘formatNumber' is used to manage the number format, but it is also available a special function to convert a number to its text representation, expressed in a specific language.

4WS.Platform - Report campi del report

4. Subreports
In case the uploaded docx template contained subreports (table or form subreports type), a second grid would show the list of these subreports. Through that grid, the user can bind each subreport with a business component (a SQL query) to use to feed that subreport.

Moreover, for each subreport the mapping between its fields and the query fields must be defined by the user, in the same way done for the main region of the report.

4WS.Platform - Report sottoreport

A user can change any part of these report settings any number of times: he can change format settings, mappings or change the template content (e.g. static content) by simply uploading the docx file again.

Report generation
When the user has completed the report settings, the template could be invoked in order to generate a report starting from it and data coming from the execution of the SQL queries.

A report can be generated by invoking it through a server-side action.

A javascript server-side action is a special component provided by 4WS.Platform which allows the creation of simple programs written using the javascript language and executed on the server side of the web application.

In the simplest case, such an action would simply contain a line of code to generate the report, starting from the docx file location:

utils.generateDocx(reportId, args, langId, path, fileName);

Once the report has been generated (in docx format), it is also possible to convert it in another format, for instance a report in PDF format.

Conclusion
To sum up, a report can be produced on the fly without the need to know how to use ad hoc report editors or pay for costly licenses. You can create report templates in docx format with a simple word processor and through 4WS.Platform automate the report generation.

Thanks to popular text editors able to manage docx file format, any newbie user can create report templates and with the simple and intuitive web interface included in the 4WS.Platform solution anyone can also be able to configure and manage the report generation.

[1] Microsoft, Encarta, MSN, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

More Stories By Lorenzo Luccon

Lorenzo Luccon is a Software Architect at Sinesy. He has more than 10 years of enterprise software development experience utilizing JEE technologies, including JSP, JS, Swing, EJB, JPA. He started focusing more on GUI-based client/server Java applications since 2001, then moved to web rich applications, including Sencha ExtJS.

@MicroservicesExpo Stories
It has never been a better time to be a developer! Thanks to cloud computing, deploying our applications is much easier than it used to be. How we deploy our apps continues to evolve thanks to cloud hosting, Platform-as-a-Service (PaaS), and now Function-as-a-Service. FaaS is the concept of serverless computing via serverless architectures. Software developers can leverage this to deploy an individual "function", action, or piece of business logic. They are expected to start within milliseconds...
Most DevOps journeys involve several phases of maturity. Research shows that the inflection point where organizations begin to see maximum value is when they implement tight integration deploying their code to their infrastructure. Success at this level is the last barrier to at-will deployment. Storage, for instance, is more capable than where we read and write data. In his session at @DevOpsSummit at 20th Cloud Expo, Josh Atwell, a Developer Advocate for NetApp, will discuss the role and value...
You know you need the cloud, but you’re hesitant to simply dump everything at Amazon since you know that not all workloads are suitable for cloud. You know that you want the kind of ease of use and scalability that you get with public cloud, but your applications are architected in a way that makes the public cloud a non-starter. You’re looking at private cloud solutions based on hyperconverged infrastructure, but you’re concerned with the limits inherent in those technologies.
Regardless of what business you’re in, it’s increasingly a software-driven business. Consumers’ rising expectations for connected digital and physical experiences are driving what some are calling the "Customer Experience Challenge.” In his session at @DevOpsSummit at 20th Cloud Expo, Marco Morales, Director of Global Solutions at CollabNet, will discuss how organizations are increasingly adopting a discipline of Value Stream Mapping to ensure that the software they are producing is poised to o...
DevOps at Cloud Expo – being held October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the world's largest enterprises – and delivering real r...
Cloud promises the agility required by today’s digital businesses. As organizations adopt cloud based infrastructures and services, their IT resources become increasingly dynamic and hybrid in nature. Managing these require modern IT operations and tools. In his session at 20th Cloud Expo, Raj Sundaram, Senior Principal Product Manager at CA Technologies, will discuss how to modernize your IT operations in order to proactively manage your hybrid cloud and IT environments. He will be sharing bes...
SYS-CON Events announced today that CollabNet, a global leader in enterprise software development, release automation and DevOps solutions, will be a Bronze Sponsor of SYS-CON's 20th International Cloud Expo®, taking place from June 6-8, 2017, at the Javits Center in New York City, NY. CollabNet offers a broad range of solutions with the mission of helping modern organizations deliver quality software at speed. The company’s latest innovation, the DevOps Lifecycle Manager (DLM), supports Value S...
SYS-CON Events announced today that Peak 10, Inc., a national IT infrastructure and cloud services provider, will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Peak 10 provides reliable, tailored data center and network services, cloud and managed services. Its solutions are designed to scale and adapt to customers’ changing business needs, enabling them to lower costs, improve performance and focus intern...
DevOps is often described as a combination of technology and culture. Without both, DevOps isn't complete. However, applying the culture to outdated technology is a recipe for disaster; as response times grow and connections between teams are delayed by technology, the culture will die. A Nutanix Enterprise Cloud has many benefits that provide the needed base for a true DevOps paradigm. In his Day 3 Keynote at 20th Cloud Expo, Chris Brown, a Solutions Marketing Manager at Nutanix, will explore t...
This talk centers around how to automate best practices in a multi-/hybrid-cloud world based on our work with customers like GE, Discovery Communications and Fannie Mae. Today’s enterprises are reaping the benefits of cloud computing, but also discovering many risks and challenges. In the age of DevOps and the decentralization of IT, it’s easy to over-provision resources, forget that instances are running, or unintentionally expose vulnerabilities.
There are two main reasons for infrastructure automation. First, system administrators, IT professionals and DevOps engineers need to automate as many routine tasks as possible. That’s why we build tools at Stackify to help developers automate processes like application performance management, error monitoring, and log management; automation means you have more time for mission-critical tasks. Second, automation makes the management of complex, diverse environments possible and allows rapid scal...
One of the biggest challenges with adopting a DevOps mentality is: new applications are easily adapted to cloud-native, microservice-based, or containerized architectures - they can be built for them - but old applications need complex refactoring. On the other hand, these new technologies can require relearning or adapting new, oftentimes more complex, methodologies and tools to be ready for production. In his general session at @DevOpsSummit at 20th Cloud Expo, Chris Brown, Solutions Marketi...
We all know that end users experience the internet primarily with mobile devices. From an app development perspective, we know that successfully responding to the needs of mobile customers depends on rapid DevOps – failing fast, in short, until the right solution evolves in your customers' relationship to your business. Whether you’re decomposing an SOA monolith, or developing a new application cloud natively, it’s not a question of using microservices - not doing so will be a path to eventual ...
SYS-CON Events announced today that Linux Academy, the foremost online Linux and cloud training platform and community, will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Linux Academy was founded on the belief that providing high-quality, in-depth training should be available at an affordable price. Industry leaders in quality training, provided services, and student certification passes, its goal is to c...
SYS-CON Events announced today that Fusion, a leading provider of cloud services, will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Fusion, a leading provider of integrated cloud solutions to small, medium and large businesses, is the industry’s single source for the cloud. Fusion’s advanced, proprietary cloud service platform enables the integration of leading edge solutions in the cloud, including cloud...
SYS-CON Events announced today that HTBase will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. HTBase (Gartner 2016 Cool Vendor) delivers a Composable IT infrastructure solution architected for agility and increased efficiency. It turns compute, storage, and fabric into fluid pools of resources that are easily composed and re-composed to meet each application’s needs. With HTBase, companies can quickly prov...
@DevOpsSummit at Cloud taking place June 6-8, 2017, at Javits Center, New York City, is co-located with the 20th International Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to wait for long developm...
With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, Cloud Expo and @ThingsExpo are two of the most important technology events of the year. Since its launch over eight years ago, Cloud Expo and @ThingsExpo have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, I provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading the...
The purpose of this article is draw attention to key SaaS services that are commonly overlooked during contact signing that are essential to ensuring they meet the expectations and requirements of the organization and provide guidance and recommendations for process and controls necessary for achieving quality SaaS contractual agreements.
SYS-CON Events announced today that OpsGenie will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Founded in 2012, OpsGenie is an alerting and on-call management solution for dev and ops teams. OpsGenie provides the tools needed to design actionable alerts, manage on-call schedules and escalations, and ensure that the right people are notified at the right time, using multiple notification methods.