This document is a draft about how to use Gazpacho technology to build a report designer. It also gives some ideas about how to write a library to create printable output from this reports.

Template systems

A template system allow the programmer to design templates that, when combined with meaningful data, will produce output data in one or more formats. A template is designed in such a way that it has placeholders where the data will be put into. Usually the template system offers a language to fill this placeholders with real data. The language should be easy enough so you don't need to be a programmer to write templates. It also should be powerful enough so complex data flows can be expressed inside the template but it should discourage the implementation of processing data algorithms that should be in the real programm instead.

Examples of template systems are:

So we can use Gazpacho to design such templates and then, write a library that converts this template definitions into final reports, probably using the data from a database storage. Having this idea, these are the core components of the architecture:

Gazpacho -> Template files + Data -> Template Engine -> Intermediate output -> Output backends (PDF, HTML, RTF, ...)

The first thing we have to do is understand the requirements of a business report since this is the use case we are aiming at. Only after this analysis is done we could write a template system useful for our needs.

Reports requirement

Usually there are two types of reports that a business will need to create:

The requirements for these two kind of reports are not exactly the same since we want an easy and powerful way to create group of interrelated data output in the first case while we want high precision layout on the second case.

Usually financial reports are composed by:

With the other kind of reports, the ones that need good looking, the requirements are: