* * *

Author Topic: FPReport testing  (Read 3647 times)

Mocte

  • New member
  • *
  • Posts: 18
FPReport testing
« on: August 24, 2017, 03:55:07 am »
Hi everyone

Just reporting my first experience with fpreport, I updated FPC + Lazarus trunk on a Windows 7 VM 64 bits using FPCupdeluxe, with the sole purpose of compiling fpreport demo and check how it looks like, I found that it was not posible to compile the lclfpreport package, at first because missing units, the very first error I got was something like: Cannot find fpreport used by cfg...  I double checked the fpreport folder and indeed the file was missing, then I went to fpgui repository on github and pulled that file ( and others missing ) from there, then I got another error: "fpreport - Illegal unit name", I'm not familiar at all with Lazarus yet, I solved it by renaming the unit to fpreport_ but then I had to correct a lot of references to the original name, at the end succeeded on my adventure of compiling lclfpreport, then I proceeded to compile the demo, I had an experience similar to the previous one plus changing some defines and installing freetype on windows but at the end all went fine and I could ran the demo from the command line, I did the same more or less for the IDE packages, played a little bit with the designer, it looks neat :-).

As I stated before I'm not that familiar with packages and Lazarus, I'm sure renaming fpreport file can be avoided  %)

Now, I'm not sure it is safe to mix code from the two repositories, everything compiles and works fine AFAICS but I would prefer to pull all the source from the same place, perhaps it is not available in trunk yet? 

Anyway wonderful work you have done there, I just wanted to have a taste of fpreport and it looks promising, keep up the good work, I'll be looking forward for future commits.

Thank you all.


 

Pascal

  • Hero Member
  • *****
  • Posts: 541
Re: FPReport testing
« Reply #1 on: August 24, 2017, 09:25:47 am »
Did you see the README in components/fpreport?
Code: Text  [Select]
  1. Compiling:
  2.  
  3. - Run-time package:
  4.   lclfpreport.lpk
  5. - Report Designer windows and functionality:
  6.   design/lazfprepordesign.lpk
  7. - FPreport component IDE registration and design-time support:
  8.   design/lazidefpreport.lpk
  9. - Standalone designer:
  10.   design/reportdesign.lpr
  11. - Demos: demos/fcldemo.lpr
  12.  
  13. Before compiling demos:
  14.  
  15. Copy the contents of the FPC fcl-report/demo directory to the demo
  16. directory.
  17.  
  18. Check the various defines in udapp.pp and demos.inc:
  19.  
  20. EXPORTPDF - enable export to PDF
  21. EXPORTFPIMAGE - enable export to image
  22. EXPORTHTML - enable export to html
  23.  
  24. To enable the following defines, check the lcldemo project
  25. EXPORTLCL - enable export to LCL (preview)
  26.  
  27. Running on windows:
  28. If EXPORTFPIMAGE is defined, the freetype.dll is needed.

I just did a test on Win10 x64.
Fresh checkout of fpc and lazarus.
Building fpc and lazarus.
After installing the 3 packages, adding the freetype-6.dll to laz and demo directory and rebuilding the ide i could run the sample prog from the ide without any changes.
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

Mocte

  • New member
  • *
  • Posts: 18
Re: FPReport testing
« Reply #2 on: August 24, 2017, 01:50:42 pm »
Did you see the README in components/fpreport?
Code: Text  [Select]
  1. Compiling:
  2.  
  3. - Run-time package:
  4.   lclfpreport.lpk

Of course I did but in order to follow the instructions first you must have the complete set of files that make up the package, e.g. to compile lclfpreport.lpk you need fpreport.pp and it is not there :o, the same with other files, thats why I pulled them from fpgui repository.

I just did a test on Win10 x64.
Fresh checkout of fpc and lazarus.
Building fpc and lazarus.
After installing the 3 packages, adding the freetype-6.dll to laz and demo directory and rebuilding the ide i could run the sample prog from the ide without any changes.

May be I'm not checking out the correct revision/branch, but as I already said I'm using FPCupdeluxe and I'm trusting in the automated process it does to update from trunk, btw I cannot see the missing files browsing : https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/components/fpreport/?root=lazarus or Graeme's mirror on github https://github.com/graemeg/lazarus/tree/upstream/components/fpreport, and don't take me wrong, I'm not complaining, the motivation of this post was to make the right people aware that maybe some files were not commited, but If you have them all with a simple checkout then the problem is elsewhere.

I'm sure I should not be touching the code e.g. renaming units, but that was the path I had to go to succeed.
« Last Edit: August 24, 2017, 01:56:53 pm by Mocte »

DonAlfredo

  • Hero Member
  • *****
  • Posts: 819
Re: FPReport testing
« Reply #3 on: August 24, 2017, 01:58:33 pm »
Perhaps I can help.

Strangely enough, I did encounter an update problem (perhaps the same problem as OP) while updating trunk with fpcupdeluxe just yesterday !

To solve, I had to remove the whole fpcsrc-directory. And run fpcupdeluxe again.

I am still looking into this. But I could not reproduce this error after solving it. It has something to do with the way svn is used (svn gave an error while updating trunk).

Groffy

  • Full Member
  • ***
  • Posts: 186
Re: FPReport testing
« Reply #4 on: August 24, 2017, 02:42:15 pm »
The fpc wiki page

http://wiki.freepascal.org/Road_map

seems to be outdated. For which release is the FPReport integration planned? For fpc3.0.4 its too late


Best regards
Linux Mint 18.3 - KDE / Windows8 / Lazarus 1.6.4 / trunk -qt

Graeme

  • Hero Member
  • *****
  • Posts: 1419
    • Graeme on the web
Re: FPReport testing
« Reply #5 on: August 25, 2017, 12:23:58 am »
Just reporting my first experience with fpreport, I updated FPC + Lazarus trunk on a Windows 7 VM 64 bits using FPCupdeluxe,

I update my repositories using my Git mirrors of FPC and Lazarus - I've never used FPCupdeluxe and don't actually know what it offers or does. Either way, I update FPC Trunk (3.1.1) and recompiled it and installed it as I normally do with FPC trunk. I then updated Lazarus - though LCL is not strictly needed for testing fpReport and it is toolkit independent and 100% non-GUI enabled.

I managed to open the demos/fcldemo.lpi directory from the FPC source and it compiled without problems.

Quote
Anyway wonderful work you have done there, I just wanted to have a taste of fpreport and it looks promising, keep up the good work, I'll be looking forward for future commits.
Thanks, it was a joy developing fpReport. A very interesting task. So too was fpPDF and fpTTF. :)  The latter two were actually way more challenging than fpReport.

Regards,
  Graeme
« Last Edit: August 25, 2017, 01:25:14 am by Graeme »
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Graeme

  • Hero Member
  • *****
  • Posts: 1419
    • Graeme on the web
Re: FPReport testing
« Reply #6 on: August 25, 2017, 12:29:54 am »
seems to be outdated. For which release is the FPReport integration planned? For fpc3.0.4 its too late

I guess the aim was for FPC 3.0.4 seeing as it is brand new and doesn't affect anything else. Just like fpPDf and fpTTF was backported and released for FPC 3.0.2. But maybe Michael van Canneyt waited too long to add it to FPC Trunk. Either way, what is done is done.

Good news is than nothing prevents you from using fpReport, fpPDF and fpTTF with FPC 2.6.4 and later. Simply copy the relevant [packages] code from FPC Trunk, and it to your existing setup's search path and away you go. And yes, all three packages work with FPC 2.6.4 too.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Mocte

  • New member
  • *
  • Posts: 18
Re: FPReport testing
« Reply #7 on: August 25, 2017, 12:53:09 am »

I update my repositories using my Git mirrors of FPC and Lazarus - I've never used FPCupdeluxe and don't actually know what it offers or does. Either way, I update FPC Trunk (3.1.1) and recompiled it and installed it as I normally do with FPC trunk. I then updated Lazarus - though LCL is not strightly needed for testing fpReport and it is toolkit independent and 100% non-GUI enabled.

I managed to open the demos/fcldemo.lpi directory from the FPC source and it compiled without problems.

Thanks, it was a joy developing fpReport. A very interesting task. So too was fpPDF and fpTTF. :)  The latter two were actually way more challenging than fpReport.

Regards,
  Graeme

Perhaps I can help.

Strangely enough, I did encounter an update problem (perhaps the same problem as OP) while updating trunk with fpcupdeluxe just yesterday !

To solve, I had to remove the whole fpcsrc-directory. And run fpcupdeluxe again.

I am still looking into this. But I could not reproduce this error after solving it. It has something to do with the way svn is used (svn gave an error while updating trunk).

The more I think about it, the more I convince myself that it is an omission on my side, unfortunately my lazarus time is limited, but on the positive side I'm getting used to the Lazarus ways, please bear with me I will improve over time  :)


Groffy

  • Full Member
  • ***
  • Posts: 186
Re: FPReport testing
« Reply #8 on: August 26, 2017, 11:36:37 am »
Good news is than nothing prevents you from using fpReport, fpPDF and fpTTF with FPC 2.6.4 and later. Simply copy the relevant [packages] code from FPC Trunk, and it to your existing setup's search path and away you go. And yes, all three packages work with FPC 2.6.4 too.

I already thought about that, which packages do I need from the fpc trunk?

fcl-report
fcl-pdf

which one is containing the fpTTF?


Best regards
Linux Mint 18.3 - KDE / Windows8 / Lazarus 1.6.4 / trunk -qt

JZS

  • Full Member
  • ***
  • Posts: 184
Re: FPReport testing
« Reply #9 on: August 28, 2017, 08:34:03 am »
Please help. I can not install FPReport!

I tried for several days and non from my efforts has worked.

I ended up with the attached message after installing the sources and placing the DLL in WIn Dir (and just in case in the Lazarus folder as well).

Sorry for posting under this thread.
I use recent stable release

Graeme

  • Hero Member
  • *****
  • Posts: 1419
    • Graeme on the web
Re: FPReport testing
« Reply #10 on: August 28, 2017, 04:56:23 pm »
fcl-report
fcl-pdf

which one is containing the fpTTF?

Yes, those are the two packages. The fpTTF code is now included in the "fcl-pdf/src/" directory.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Graeme

  • Hero Member
  • *****
  • Posts: 1419
    • Graeme on the web
Re: FPReport testing
« Reply #11 on: August 28, 2017, 04:59:09 pm »
Please help. I can not install FPReport!

Please see the <fpc_src>/packages/fcl-report/demos/compiling.txt file and follow those instructions. If you still have an error, please supply a backtrace, as the error screenshot you send doesn't give much information to go with. The WIKI explains how to produce a backtrace in case you don't know.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

JZS

  • Full Member
  • ***
  • Posts: 184
Re: FPReport testing
« Reply #12 on: September 01, 2017, 07:58:03 am »
Please see the <fpc_src>/packages/fcl-report/demos/compiling.txt file and follow those instructions. If you still have an error, please supply a backtrace, as the error screenshot you send doesn't give much information to go with. The WIKI explains how to produce a backtrace in case you don't know.

That is the problem Graeme. I did not reach that far. I am stuck in the first compiling steps fpreport/README.txt:
Compiling:

- Run-time package:
  lclfpreport.lpk compiled this, check
- Report Designer windows and functionality:
  design/lazfprepordesign.lpk and compiled this, check
- FPreport component IDE registration and design-time support:
  design/lazidefpreport.lpk I am stuck here.When compiled this and installed, and when asked to rebuild I clicked yes, then upon restarting I receive the "Cannot find freetype-6.dll" when placing the DLL in the System Folder, Lazarus does not want to start anymore and gives that message "The application was unable to start correctly..." and Lazarus does not start until I rebuild with "make clean" and then I remove FPReport before rebuilding to reload the installed packages.
- Standalone designer:
  design/reportdesign.lpr
- Demos: demos/fcldemo.lpr

Before compiling demos:

Copy the contents of the FPC fcl-report/demo directory to the demo
directory.


Thanks Graeme, appreciate your support.

PS: I am on Win 7, 64bit, tried with Lazarus 1.8RC4 and Lazarus 1.9
« Last Edit: September 01, 2017, 08:02:14 am by JZS »
I use recent stable release

Pascal

  • Hero Member
  • *****
  • Posts: 541
Re: FPReport testing
« Reply #13 on: September 02, 2017, 05:58:23 am »
JZS, what target did you compile to? 32bit or 64bit?
The dll has to fit to this. For testing just copy the appropriate dll in the folder of the lazarus exe
and you are done.
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

JZS

  • Full Member
  • ***
  • Posts: 184
Re: FPReport testing
« Reply #14 on: September 02, 2017, 02:37:19 pm »
Thanks Pascal. Now I got it working. It was the "zlib1.dll" that was missing to be placed next to the FreeType DLL.
I use recent stable release

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus