* * *

Author Topic: Lazarus, report and CGI  (Read 13481 times)

valdir.marcos

  • Sr. Member
  • ****
  • Posts: 276

Graeme

  • Hero Member
  • *****
  • Posts: 1419
    • Graeme on the web
Re: Lazarus, report and CGI
« Reply #31 on: April 10, 2017, 11:18:02 am »
Can we expect fpReport to debut on Lazarus 1.8?

fpReport will be released into FPC's repository - it is not a Lazarus dependent project. We are planning on implementing visual report designers - LCL and fpGUI based - which will be released to those projects respectively. Both the visual report designers have been started, but not completed yet. fpReport itself is complete - as I've mentioned before.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

valdir.marcos

  • Sr. Member
  • ****
  • Posts: 276
Re: Lazarus, report and CGI
« Reply #32 on: April 12, 2017, 07:00:51 pm »
It would be very helpful to have the converter.
Indeed, and I hope the existing demos and converter code I wrote would inspire someone to write a LazReport converter. As I mentioned, it was not part of my work assignment, hence I didn't do it.

No news sorry. I do know one or two people have asked Michael directly if they could get a “test” copy in the mean time, which he did. So maybe that’s an option for you.

We have reports made in Quick Report, Rave Reports, Fast Report, Free Report, Report Builder, Fortes Report, and LazReport.
I want to make a simple converter from FortesReport to fpReport.
Can you help in PM to reach Michael and get a copy of fpReport, so I can study it and start making an initial simple converter from FortesReport?
Thanks.

valdir.marcos

  • Sr. Member
  • ****
  • Posts: 276
Re: Lazarus, report and CGI
« Reply #33 on: April 12, 2017, 07:45:40 pm »
Will it have a draft filter to printers that do not have a page size such as POS (Point of Sale) printers or impact printers?
I'm not sure what that entails as I've never worked on POS printers before. I can say that fpReport has a Paper Manager with predefined standard paper sizes. There is also a custom paper size, where you can define anything you want. I guess for POS systems  one could do a basic line height calculation, then multiply that by the number of data items plus the header, footer, and set that as the page height. I really don't know. :-/

Maybe, I could now express myself correctly.
These videos show what kind of printer I am talking about:
----------
Epson TM-T20ii Thermal Printer Review and Demonstration
https://www.youtube.com/watch?v=oi2Sd70Pkn0

Epson ReadyPrint ® T20 Impresora de Recibos Térmica TM-T20
https://www.youtube.com/watch?v=7-LrQkFBIzs
----------

Each document printed may be of any size.
Can you think of properties like "PageBreaking=False" and "Eject=False" where the size of the paper would be endless and the report would not make an "eject" at the end of printing?

valdir.marcos

  • Sr. Member
  • ****
  • Posts: 276
Re: Lazarus, report and CGI
« Reply #34 on: April 12, 2017, 07:49:43 pm »
FortesReport has a component named TRLDraftFilter, which allows faster printer directly to the device without using any OS drivers:
https://github.com/fortesinformatica/fortesreport-ce/blob/master/Source/RLDraftFilter.pas

Is it possible that frReport have a similar solution?

----------------------------------------
http://fortesreport.com.br/?page_id=59
-------------------
English:
Quick printing
One of the unique features of FortesReport, the draft filter, allows you to send reports to high-speed dot-matrix printers without disturbing your design or style. It encodes graphic fonts and coordinates of components and writes directly to the printer port without driver use.
-------------------
Brazilian Portuguese:
Impressão rápida
Uma das características únicas do FortesReport, o filtro draft, permite enviar relatórios para impressoras matriciais com alta velocidade sem mexer no seu design ou estilo. Ele codifica fontes gráficas e coordenadas dos componentes e escreve diretamente na porta da impressora sem uso de driver.
-------------------
http://fortesreport.com.br/?page_id=16
-------------------
English:
How to use the filter for dot matrix printers?
The draft filter implemented by the TRLDraftFilter component acts by sending native printer control codes directly to the device's network port or path. Once inserted into an active form of the project, preferably the main module, it will appear as one more option in the list of printers in the print dialog of the reports. Devices configured by default are /dev/lp0 for Linux and prn for Windows. This can be changed at any time through the DevicePath property of the filter component.
-------------------
Brazilian Portuguese:
Como utilizar o filtro para impressoras matriciais?
O filtro draft implementado pelo componente TRLDraftFilter atua enviando códigos de controle nativos da impressora diretamente para a porta ou caminho de rede do dispositivo. Uma vez inserido em um form ativo do projeto, preferencialmente o módulo principal, ele aparecerá como mais uma opção na lista de impressoras no diálogo de impressão dos relatórios. Os dispositivos configurados como padrão são o /dev/lp0 para o Linux e prn para o Windows. Isto pode ser alterado a qualquer tempo através da propriedade DevicePath do componente de filtro.
----------------------------------------

valdir.marcos

  • Sr. Member
  • ****
  • Posts: 276
Re: Lazarus, report and CGI
« Reply #35 on: April 12, 2017, 08:05:25 pm »
News on fpReport project?
From my side, fpReport is ready for the v1.0 release.
So now it is up to Michael to decide when he wants to publish the code to the FPC repository.
Michael has in the mean time started work on a Visual Report Designer component ...

Will messages and text components be easily translated into other languages according to the environment or manual setting?
Localization of reports are up to the application generating the report. It's not the job of the report engine itself.

Sorry, about translating I was not talking about fpReport engine itself, but about a "print previewer dialog" window that should localize (automatically or manually) its messages, texts and captions. Will the print previewer dialog window of fpReport have a way of translating its messages?

----------------------------------------
http://fortesreport.com.br/?page_id=59
-------------------
English:
Localization
All messages and texts of the components can be customized easily. The package already has translation for four languages, selected automatically according to the environment.
-------------------
Brazilian Portuguese:
Internacionalização
Todas as mensagens e textos dos componentes podem ser personalizados facilmente. O pacote já possui tradução para quatro idiomas, selecionados automaticamente de acordo com o ambiente.
----------------------------------------

Thanks for your effort, time and patience.

valdir.marcos

  • Sr. Member
  • ****
  • Posts: 276
Re: Lazarus, report and CGI
« Reply #36 on: August 15, 2017, 08:09:21 am »
Very good news:

http://lists.lazarus.freepascal.org/pipermail/lazarus/2017-August/232331.html

[Lazarus] Reporting engine - What it's state?
Michael Van Canneyt
Sat Aug 12 11:03:30 CEST 2017


Hi,

I will commit the code to FPC svn the coming  week.

Michael.

On Fri, 11 Aug 2017, Andreas Frieß via Lazarus wrote:

> Hi,
>
> pls, where can the actual 'unstable ?' Code found ? fpc trunk, where ?
>
> Thanks
> Andreas
>
> Am 24.07.2017 um 08:54 schrieb Michael Van Canneyt via Lazarus:
>>
>>
>> On Mon, 24 Jul 2017, Gabor Boros via Lazarus wrote:
>>
>>> Hi All,
>>>
>>> 2015. 07. 09. 21:45 keltezéssel, Michael Van Canneyt írta:
>>>> Just an opinion:
>>>> I am working with Graeme Geldenhuys to create a reporting engine from
>>>> scratch.
>>>> I think Lazreport's design contains some fundamental flaws, which can
>>>> only be remedied by re-implementing a reporting engine from scratch.
>>>
>>> Two years gone. Any news? I see "In progress" on the Foundation's page,
>>> but want to know more detailed informations.
>>>
>>> https://foundation.freepascal.org/projects/reporting-engine
>>
>> It's ready and waiting for release. I'm waiting for 2 small fixes still:
>> - Some strange error when exporting a custom element to PDF
>> - Removing a dependency on freetype.dll on windows.
>>
>> Michael.
>>

valdir.marcos

  • Sr. Member
  • ****
  • Posts: 276
Re: Lazarus, report and CGI
« Reply #37 on: August 21, 2017, 06:02:04 am »
More good news:

http://lists.freepascal.org/pipermail/fpc-pascal/2017-August/052074.html

----------------------------------

[fpc-pascal] fpReport released

From: Michael Van Canneyt
Sun Aug 20 20:35:19 CEST 2017

Hello,

A long time wait. But it finally made it:

fpreport has been committed to FPC SVN: packages/fcl-report.
It should compile on windows, linux, freebsd and darwin.

Features and architecture are described on:
http://wiki.freepascal.org/FPReport

Short highlights:
- Banded report design.
- Streaming to JSON, streaming XML is on TODO.
- expressions using fpexprpars.
- No GUI Dependencies.
- Unit tested.
- Standard support for Memo (with HTML tags embedded), image, shape and checkbox elements
- Data loop for Dataset, JSON data, collections, lists, event driven.
- Framework for extending with other elements (demo contains polygon).
- Export out of the box to following format:
 - Pure HTML.
 (TOC pages, optional use of frames, highly configurable)
 - Images (with option to generate HTML container pages. Currently requires
 FreeType on windows)
 - PDF (using fcl-pdf)

There are 11 demo reports in a command-line.
There is also a standalone webdemo with the same demos, which shows that fpreport can be used very easily
in a headless webserver.

The LCL support has been committed to lazarus: components/fpreport.
It contains:
- Preview (export to LCL canvas)
- Printing.
- Design-time support for a report.
- Stand-alone designer, with support for accessing data from:
 CSV, DBF, SQLDB, JSON File, any REST service that exports JSON.
 Allows preview and export to all known formats.
- LCL demo program.

Todo:
- XML
- Remove freetype dependency.
- subreport.
- crosstab.
- chart support.

Exporters for FPGUI and AggPas are also available, I expect that Graeme
Geldenhuys will commit them soon.

Please remember, this is a first release. There are some known bugs and
shortcomings. Feel free to report anything you find in the bugtracker,
suggestions are also welcome.

Enjoy,

Michael.

----------------------------------

http://lists.freepascal.org/pipermail/fpc-pascal/2017-August/052076.html

Re: [fpc-pascal] fpReport released

From: Graeme Geldenhuys

> A long time wait. But it finally made it:

Indeed, and many thanks for finally making it publicly available. :-)


> Exporters for FPGUI and AggPas are also available, I expect that Graeme
> Geldenhuys will commit them soon.

Thanks for the heads-up, I'll commit the fpGUI and AggPas code tonight
or tomorrow in the fpGUI repository.

Regards,
   Graeme

JanRoza

  • Sr. Member
  • ****
  • Posts: 483
    • http://www.silentwings.nl
Re: Lazarus, report and CGI
« Reply #38 on: August 21, 2017, 10:01:16 am »
Tried to compile and install the package but ran into a problem on my first try:
Quote
cfgfpreportimageexport.pp(24,42) Fatal: Cannot find fpreport used by cfgfpreportimageexport of package lclfpreport.

Am I missing something?
I'm running Lazarus 1.9 and FPC 3.02.
OS: Windows 10 (64 bit)
Laz: Lazarus 1.8 FPC 3.0.4 i386-win32-win32/win64

Thaddy

  • Hero Member
  • *****
  • Posts: 5170
Re: Lazarus, report and CGI
« Reply #39 on: August 21, 2017, 10:11:56 am »
Quote
Am I missing something?
I'm running Lazarus 1.9 and FPC 3.02.
FPC trunk? the report engine was added to fpc not Lazarus, in trunk last week. Package fcl-report.

(Aside: you are running Lazarus trunk, but not fpc trunk?)
« Last Edit: August 21, 2017, 10:15:58 am by Thaddy »
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

JanRoza

  • Sr. Member
  • ****
  • Posts: 483
    • http://www.silentwings.nl
Re: Lazarus, report and CGI
« Reply #40 on: August 21, 2017, 11:07:18 am »
Good suggestion Thaddy, indeed I run Lazarus trunk but not FPC trunk.
I'll hunt down FPC trunk and get that installed as well.

Just to be sure I just also tried to install it running Lazarus 1.8 RC4 and FPC 3.04 but I got the same error.
I think I'm missing some essential FPC parts, so let me first get FPC trunk, then I'll try again.
OS: Windows 10 (64 bit)
Laz: Lazarus 1.8 FPC 3.0.4 i386-win32-win32/win64

Thaddy

  • Hero Member
  • *****
  • Posts: 5170
Re: Lazarus, report and CGI
« Reply #41 on: August 21, 2017, 12:02:02 pm »
« Last Edit: August 21, 2017, 12:08:59 pm by Thaddy »
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

JanRoza

  • Sr. Member
  • ****
  • Posts: 483
    • http://www.silentwings.nl
Re: Lazarus, report and CGI
« Reply #42 on: August 21, 2017, 04:30:04 pm »
Got it compiled and installed after using fpupdeluxe to update FPC to latest trunk.
Now i got to figure out the example and see how it works. Always fun jumping into something new (even for a guy of almost 64).  :D
OS: Windows 10 (64 bit)
Laz: Lazarus 1.8 FPC 3.0.4 i386-win32-win32/win64

Groffy

  • Full Member
  • ***
  • Posts: 186
Re: Lazarus, report and CGI
« Reply #43 on: August 22, 2017, 09:49:01 am »
Hello,

is FPReport supporting DMP printers in any way?


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

Pascal

  • Hero Member
  • *****
  • Posts: 579
Re: Lazarus, report and CGI
« Reply #44 on: August 22, 2017, 10:30:36 am »
Hello,

is FPReport supporting DMP printers in any way?


Best regards
I don't think so as output is graphical and not ASCII.
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

 

Recent

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