REPCoder - Screenshots
REPCoder is a reporting tool. It allows you to design and manage database reports. It is mainly intended for programmers of database Windows applications. But it can also be used by independent report developers. So it works in two versions: REPCODER.DLL or REPCODER.EXE respectively. These files are very small (32-bit: about 1.6 MB, 64-bit: about 2MB).
The tool has no installer. You only need one of these two files. A programmer simply deploys REPCODER.DLL together with his EXE (in the same directory). Other developers use only REPCODER.EXE.
In the 64-bit version the file names are: REPCODER64.EXE, REPCODER64.DLL.
This software although of rather small size and simple form has very advanced mechanisms allowing to create almost any kinds of reports. It is SQL-based tool, so it requires very good knowledge of SQL. There are no visual "query designers" here. You must simply edit SQL texts manually. Because the program has also the built-in its own script language (similar to C), the programming skills are also recommended. Therefore REPCoder can be treated (according to its name) as a tool for programming reports. It has very high performance, can work with very large data and on a relatively slow client machine. This is a fully WYSIWYG tool (what you see is what you get). So there is no need for the "print preview" option there, because the screen and a printer always show the same. It is especially important while displaying multiline texts. Some other reporting tools break text lines differently on a printer and on the screen. REPCoder has no such problems.
The documentation of REPCoder consists of 4 guides and 25 sample reports. There are also source codes of sample applications (C/C++, C#, Delphi, Java), that present how to use the functions of REPCODER.DLL. The guides were created using REPCoder, so they have SFM extensions, just like the report project files. They must be opened with REPCODER.EXE.
4 database connection methods:
The communication with databases is of course through SQL language. In the current version the program uses 4 independent interfaces:
- BDE (IDAPI32.DLL) - only in REPCoder 32-bit !!!
- ODBC (ODBC32.DLL)
- Firebird client (FBCLIENT.DLL)
- InterBase client (GDS32.DLL or IBCLIENT64.DLL)
While working with Firebird databases, the program correctly supports the UTF-8 character set, which is present in new versions of Firebird (for example Firebird 2.17, 2.5). The ODBC interface also works with wide characters, because the program is using UNICODE versions of ODBC32.DLL functions. Only BDE (Borland Database Engine) library has no UNICODE or 64-bit version. Its development was stopped a few years ago. But this interface allows to work with older DBase and Paradox databases (DBF and DB files) with REPCoder 32-bit.
The program perfectly works with Firebird/Interbase databases, because it communicates with them natively, without any intermediate libraries. REPCoder (32-bit and 64-bit) was also tested with the newest Firebird and Interbase products: Firebird 2.5 (32-bit and 64-bit), Interbase XE (32-bit and 64-bit). While working with new GDS32.DLL or IBCLIENT64.DLL it is using SQLDA_VERSION2 of XSQLVAR structure. It also works with older GDS32.DLL versions, where SQLDA_VERSION1 is used. The program can open both types of connections (with Firebird and InterBase databases) in the same report. The Firebird method is using FBCLIENT.DLL (32-bit version can also use GDS32.DLL if FBCLIENT.DLL cannot be found), and InterBase method is always using GDS32.DLL or IBCLIENT64.DLL. However you should not rename FBCLIENT.DLL to GDS32.DLL, what is optionally proposed by Firebird installers.
You can also work with MSSQL or ORACLE because there exist very good ODBC drivers for them. The same situation is also for other well known SQL servers.
A report can use many database connections:
2 kinds of SQL queries
To design a new report in our program you first define database connections. Then you write SQL queries. There are two kinds of them. First you can define (optionally) exactly one so called external query and then (also optionally) as many as you need so called internal queries. They are usually parameterized by the fields of the external query. After the report is executed the user can navigate over the "external records" (result set returned by the external query). After each such a move the report is rebuilt. It means that all internal queries are re-executed, because some fields of the current external record could have changed. The presence of both types of queries in the report is not necessary. Taking this into account we can distinguish 3 types of reports:
- simple static (one external query, no internal queries)
- simple dynamic (no external query, at least one internal query)
- complex (one external query, at least one internal query)
Designing reports (Rectangles):
The program works in 2 modes: Designing mode and Working mode. You can switch between them using F5 function key.
Report design method in REPCoder is based on Rectangles.
The designer method of report graphics is quite original here and very different from other reporting tools. It is surely the main idea and the strongest mechanism in this program. It works in this way, that you divide without holes a primary page into separate rectangles. Their edges can be moved with arrow keys or mouse. You can also collectively move (vertically or horizontally) all rectangles, holding additionally the CTRL key. This way you can quickly build the exact document structure you need. When you select (with mouse) one of the rectangles, it becomes so called the Selected rectangle. Then you can define the "list of texts" to be displayed inside the rectangle. They can be static texts or database fields defined earlier in the SQL queries. There are many options to align a text inside a rectangle. An interesting option is the possibility to justify together many multiline texts with different fonts. Another important mechanism allows to inline database texts into normal static text and format it together. The rectangles and a whole page can have its own background colour and pictures (BMP, ICO, JPG, GIF, TIF, PNG).
The Rectangles can be joined into 8 Groups.
The Selected rectangle can be added (or removed) to a so called Group of rectangles. A group is a collection of rectangles that also together form a rectangle. There are 8 types of groups in REPCoder:
- No (a rectangle does not belong to any group)
- Table Header
- Internal Table
- Sum Header
- Sum Footer
- Page Header
- Page Footer
Using the groups Sum Header and Sum Footer you can design nested sums of first, second, and any order. A group as a whole is never divided on a page boundary after the report is executed. A group can be copied to Clipboard and then pasted into another rectangle in the same or another report.
Different text format:
Texts design dialog:
Different display data format:
Data display format design dialog:
A sample design report page:
Reports are executed as background threads:
REPCoder is a very light and fast reporting engine.
A sample executed report:
WYSIWYG - What You See Is What You Get:
The report printed to PDFCreator looks exactly the same. The text lines are also broken in the same way. So there is no need for "Print-Preview" option in REPCoder.
A report project is stored in a file with SFM extension. When you open a report manually (with REPCODER.EXE) or programmatically (with REPCODER.DLL) you can pass a set of parameters to it. Parameters are text variables designed in the report project. They are used by a report in many places, mostly in the texts of SQL queries. You can also define so called "complex parameters". They are built of many fields just like a record in a database table. The list of parameter's values can be defined manually or can be built dynamically as a result set of some SQL query. You can also design a special grid here for the end user, to view the result set of this query and choose the needed value of the parameter. Such a grid can also be designed for the external query to comfortably navigate over external records.
SQL queries can have parameters:
The built-in script language (Calculated fields):
A standard SQL language is to weak for the needs of a reporting tool. Its main role is only to read data from a database. But if your report requires advanced data processing you also need a programming, runtime script language. The script language of REPCoder is very similar to C. It has some additional types useful in database problems: NUMERIC, DATE, TIME, TIMESTAMP, together with their arithmetic. The NUMERIC type is based on 64-bit integers (__int64 C type). This language has a library of about 120 built-in functions. Using them, a report programmer can also write his own functions and use them in the scripts. These scripts are usually written for SQL queries to define so called Calculated fields. These fields are added to the set of fields returned by a query itself. The SQL fields work as input variables for the script. The script transforms them and produces "Calculated fields" as the output. These fields can also be displayed on the report pages. The script language has its own built-in "HELP" in the program with description of all functions. The language has of course conditional expressions (IF, ELSEIF) and the WHILE loop (with BREAK, CONTINUE keywords). It also allows to define local variables.
There are more than 100 built-in functions present, together with the HELP dialog:
Design and use a grid:
It is possible to design a grid to display the result set of some SQL query. You can do it to select a value of a report parameter or to navigate the result set of the External Query.
Unicode and UTF-8:
The report project in REPCoder is independent and fully separated from the application code. This project is stored in a binary file (SFM extension). The application opens this file calling a single function of REPCODER.DLL. It can also pass here a set of text parameters. They are interpreted in a report according to the intention of its author. The whole product is enclosed in a single DLL (size about 1.6 MB), which is deployed together with the application. It does not require any installation procedure, to make the complicated life of a programmer a little bit easier. It is a classical, standard Windows DLL library, which can be used by applications created with any compiler. So all the functions of REPCODER.DLL are just C-language functions. There are no C++ classes here with their complicated hierarchy. So the programming interface is very simple. The main function of the library is repc_open_report(). It has 12 input arguments. You must also call repc_init() at the same beginning and repc_exit() at the end. The functions of the library are UNICODE. But they also have ANSI versions for programmers of ANSI applications. Their names have additionally the "_a" ending. We also provide the interface for C# developers. This is the REPCODER.CS file with a single class Repcoder and a set of static functions. They are mapping the functions of REPCODER.DLL. Using this class is also very simple and presented by a sample program in the package. The interface for Delphi programmers is in the REPCODER.PAS unit (example program: TEST_DELPHI.PAS). The interface for Java (Windows only) is Repcoder class defined in Repcoder.java (example program: Test.java).
Other features of REPCoder:
- User-defined design page size (default: A4 = 200mm x 288mm)
- Good support for SQL NUMERIC (DECIMAL) type. It is not converted to a floating point type
- Many formats of display of data - for example 15 formats for DATE type
- Possibility to display numbers and money "in words" using various currencies
- Possibility to define many languages of display of data
- Statistics on pages - sum on page, transfer from previous pages, together
- Script queries - allow to create temporary tables if necessary for the final queries
- Archivisation of report results - visual archives (SFR files)
- Export of SQL results to text files in a user-defined format
- Conditional display of groups and pages using report parameters
- Possibility to copy a page of executed report to clipboard in BMP or Windows metafile format
- Possibility to change database data from the executed report
- Possibility to change the report project by the end user
- Good support for the BLOB (binary large object) data - MEMO and pictures
- Support for long MEMO fields that can be divided into many pages
- Currently there is no possibility to draw plots
- There is no direct export to PDF yet. You should install PDFCreator for example and simply print to it
A new program: Report Admin version 1.0
was released in January 2015.
It is a Reporting Server based on REPCODER.DLL and Firebird (or InterBase) SQL Server.