Lazarus
Programming => Databases => Topic started by: dodgebros on January 07, 2021, 07:24:36 pm
-
I have Lazarus IDE version 1.8.0 and FPC 3.0.4 installed on Win7, 32bit OS. I would like to use FPReports, including the GUI Designer. How do I install FPReports?
TD :o
-
There is comprehensive documentation in the Wiki: FPReport (https://wiki.freepascal.org).
-
Ok, I have read the Wiki docs on FPReport and I did not see how to install FPReport. So, how do you install FPReport as part of Lazarus?
TD 8)
-
FPReport FAQ (https://wiki.freepascal.org/FPReport_FAQ) seems to be the relevant article.
-
FPReport can be found at:
Lazarus main menu > Package > Install/Uninstal Packages > on the right panel searchbox type: fpreport
Unfortunately, just like the FAQ said it cannot compile on 64-bit Lazarus. It failed on my Lazarus 2.0.10 64-bit Linux with this message:
Compile package cairocanvas_pkg 0.0: Aborted
Compile package lclextensions_package 0.6.1: Exit code 1, Errors: 1
delphicompat.pas(137,2) Fatal: Cannot open include file "uses.inc"
Note:
You should not try it on your production computer. If fpreport fails to install when rebuilding the IDE, the package system will become messy. Now I cannot rebuild my Lazarus even I remove the package, will have to spend some time manually cleaning it or reinstall the Lazarus.
-
Hi Handoko, thanks for helping. I looked at Lazarus main menu > Package > Install/Uninstal Packages > on the right panel but fpreport is not listed there. I have already read the FAQ but I'll take another look, maybe I missed something.
TD 8)
-
As far as I know FPReport is not available on Lazarus 1.8.0. You should to consider to upgrade your Lazarus.
-
FPReport need FPC3.2.x as a minimum (for working out of the box, without coping files around). FPReport resides in the fpc, Lazarus have only a wrapper and some additional components. So only install a fresh Lazarus with an old fpc will also not work.
-
Ah, that is why I couldn't find fpreport. So, I just removed the old Lazarus installation from my development machine and downloaded the latest version of Lazarus and installed it successfully.
I found this: C:\Lararus\fpc\3.2.0\source\packages\fcl-report. I opened this in Lazarus and the report designer appeared. I created a simple report, very nice. BUT, is it a compiled app or is it suppose to be accessed from within the Lazarus IDE menus?
Thanks guys for getting me this far !
TD :D
-
The designer is not built in, but you can configure it as an external tool in the Lazarus IDE. Normal the designer reside in ???\lazarus\components\fpreport\design . The Package is in ???\lazarus\components\fpreport.
There is also a demon for Lazarus in Tools/Example Projects and search for fpreport
-
When I compile C:\Lazarus\components\fpreport I am getting the error "svn not in path". What this about and how do I fix it?
TD :(
-
Is Subversion (svn) installed?
Is it really an error - it's usually merely a warning because it is usually only used to add the revision number to the compiled file.
-
You are correct, it is a warning. I will try to capture a screen shot of it and post it. In the mean time I now have FpReport in the Lazarus IDE. I placed a TFPReport and a TFPDatasetData on a form then double clicked the TFPReport to get the report designer to open. In the designer, under the "Report" section of the menu bar, the "Report Data" is missing. With that missing, how does one connect the report to the data?
TD :o
-
Are the SQL-DB (NOT Zeos) and DB-Components installed ?
-
Yes, they are installed on a datamodule and they are SQLdb components.
*************************************************************
Also, I have compiled the FPReport Designer, in c:\lazarus\components\fpreport\design. The designer opens ok but on close I get this error (see attached screen capture also):
Heap dump by heaptrc unit of C:\Lazarus\component\fpreport\design\reportdesign.exe
29804 memory blocks allocated: 3844993/3950096
29804 memory blocks freed : 3844996/3950096
0 unfreed memory blocks: 0
True heap size:884736 (80 used in System startup)
True free heap:884656
I need help resolving either or both of these issues with the report designer please,
TD
-
This it not a Error, it is a information from Heaptrace. 0 unfreed blocks means, all ok. Look in the Project Options, Compiler Option -> Debugging, you can deactivate Heaptrace if needed.
-
I have got the fpreport designer working thanks to you guys. I created a new report with a "Report Data" which is a SQLite database.
Attached is a screen capture of the report in preview. The first column on the database table is numeric. The second column is a string and should look like this: "001234". The third column is also a string and is the name of the business.
Obviously the second and third columns are not showing the data correctly so what is wrong here?
TD
-
If you can post a sample, it will possible to find the issue. Is the Data correct ?
-
Thanks to everyone who tried to help with my quest to use fpreports. After much thought I have decided to use LazReports for now.
TD