LReport - a very simple example


The purpose of this example is to show you what kind of RTF reports you can get using LReport. If you want to learn how to use it, please read the documentation on project's web site.

Imagine that you are a tester. You are testing a customer care system. One of functionalities you test, is adding a new service to a customer. As a real professional you want do carefully document the test results (or you are forced to do it by company's standards).
You know, that the most important changes take place in the database. The following tables are going to be modified:

CUSTOMERS
SERVICES
INVOICES

You chose a customer with ID "12345". First you need to take a snapshot of these tables before the test. You check the tables by doing the following selects:

select * from CUSTOMERS where CUSTOMER_ID = "12345"
select * from SERVICES where CUSTOMER_ID = "12345"
select * from INVOICES where CUSTOMER_ID = "12345"

First select is going to return 1 row, second - 2 rows, third, 4 rows.
There is a problem though. Each of these tables have more then 10 columns. And you are not interested in all of them, since some of them are modified only in very specific circumstances. If you copy and paste all columns into you document, it would be difficult to see what are the values of columns you are really interested in.
You can configure LReport in a way that it will report only columns you are interested in.
LReport generates the following report for you:

Initial database snapshot
Initial database snapshot

As you can see on the report, some columns are highlighted. You can chose, which columns should be highlighted as being most important for the test.

So, you have the initial snapshot.
Now you do your test. You add a new service. Once you are done you run LReport to create a new snapshot for you.
It looks like this:

Database snapshot after running the test
Database snapshot after running the test

Note that the second report contains some additional formating. This formatting is used to show differences between snapshots.
In CUSTOMERS table, you can see the field "NUMBER_OF_SERVICES" is in italics, bolded and underlined. This is to show that the value has changed.
In SERVICES table, one row is bolded with double underline. This is to show, that this is a new row, which was inserted during the test case.
The same for INVOICES.