Forum > LazReport

Lazreport Designer expanded to include the ability to save reports in a database

(1/3) > >>

MaxLemberger:
I've expanded the Lazreport Designer to include the ability to save reports in a database (table). The designer has also been given a few more properties:

AskBeforeDBSave, DataField, DataSource, DBTemplateDir, SaveToDatabase.

The description is available as a PDF and is attached here. If you're interested in this option, please download and read the PDF file.

As usual, the database connection is via embedded Firebird – so it doesn't need to be installed – and ZEOS (must be installed via the Online Package Manager). I'm working with this combination and am very happy with it.  How to create a database in the program is also included as compact source code, but no further commented.

The new report component, along with a description and sample program, can be downloaded from this page:
https://lazarus.intern.ws/lazreport_designer_database.html

The English PDF file or description is attached to this topic and not included here to keep the post short.

Suggestions for the design and refinement of the designer are welcome.

The attached PDF file :

JanRoza:
Very nice!
Would it be possible to use SQLite as database?
All my applications use SQLite and it would be nice if they could save reports in the same database.

MaxLemberger:
I am very sure that you can take it with SQLite. You can check it first with ZEOS. You must change in ZConnection the Property LibraryLocation to your SQLite DLL and  Protocal from firebird to sqlite and maybe adjust the assignment of the database fields BLOB, String, etc. in the included SQL tables - this means adapting the creation of the database which is included to SQLite. Then creating the underlying database shouldn't be a problem. I'm busy with other things for about 14 days. If you can wait, I can take a look at it over the course of the next month.  ;D

The database connection to the report Designer is independent of a database because only standard components are addressed. At least, that's how it's designed; I haven't tested it yet.

I take ZEOS for this:  to work with my programs also with other databases.

JanRoza:
Thanks, I will experiment SQLite in the coming weeks.

CharlyTango:
I am a fan of the idea of storing report definitions in databases, which would increase network capability. Quite an exciting and solid piece of work.

What I am not a fan of, however, is the way it is implemented.
The idea of having to manually copy the two files for the complete designer over the other files with every Lazarus installation is not sustainable in my opinion.
All other extensions for LazReport are offered in packages and that is also the concept of Lazarus.

If you look at the source, it took quite a bit of code to get LazReport to cooperate. My knowledge is not sufficient to be able to estimate whether this can be included in a package and if so, how.

But maybe the maintainer of LazReport is reading along and would like to integrate the function directly into the designer or at least prepare it so that a package is possible?

Does the maintainer of LazReport have an opinion on this?

Navigation

[0] Message Index

[#] Next page

Go to full version