Recent

Author Topic: SOLVED :LazReport - console application  (Read 3220 times)

sajgon30

  • Newbie
  • Posts: 4
SOLVED :LazReport - console application
« on: February 28, 2019, 11:06:36 am »
Has anyone succeeded in running LazReport in a console application? I dynamically create all the necessary elements, load a report from the lrf file and try to export the report to PDF or print it - but it always returns an empty report.
« Last Edit: February 28, 2019, 04:43:32 pm by sajgon30 »

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: LazReport - console application
« Reply #1 on: February 28, 2019, 12:02:26 pm »
You could consider using fpReport, which is not inextricably bound to a GUI.

sajgon30

  • Newbie
  • Posts: 4
Re: LazReport - console application
« Reply #2 on: February 28, 2019, 01:43:20 pm »
Wiki:
As of 20th January 2019 FPReport does not compile out of the box in 64 bit Lazarus (Windows version at least). It should compile flawlessly in 32 bit Lazarus, though (see also "I did not find FPReport in my Lazarus dir").

It should compile ????

No way - missing file fpreport.................


I have a desktop application with Lazreport reports - I want to move reports to the server part. Changing the report generator engine is a difficult task.

Thaddy

  • Hero Member
  • *****
  • Posts: 14367
  • Sensorship about opinions does not belong here.
Re: LazReport - console application
« Reply #3 on: February 28, 2019, 02:45:38 pm »
Wiki:
As of 20th January 2019 FPReport does not compile
Looks more like an idiot that didn't get a "right" answer and spreads rumors through the wiki.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

af0815

  • Hero Member
  • *****
  • Posts: 1291
Re: LazReport - console application
« Reply #4 on: February 28, 2019, 03:23:55 pm »
I have a desktop application with Lazreport reports - I want to move reports to the server part. Changing the report generator engine is a difficult task.
LazReport have IMHO no serverpart. It is a GUI based Reportengine. You can look for freereport 3, LazReport was/is a port of it.

-- 
I have understand, this bindings to GUI was one of the goals to bring up fpreport, without any binding to visual components.

BTW: You cannot find the fpreport in Lazarus, because there is only a wrapper for fpreport from fpc.
regards
Andreas

cappe

  • Full Member
  • ***
  • Posts: 191
Re: LazReport - console application
« Reply #5 on: February 28, 2019, 03:45:51 pm »
You could consider using fpReport, which is not inextricably bound to a GUI.

Why is not installed by default as lazreport?

sajgon30

  • Newbie
  • Posts: 4
Re: LazReport - console application
« Reply #6 on: February 28, 2019, 04:43:12 pm »
Problem solved. Add the Data Module to the console project. Place all components like ZConnection, TfrReport, Query  on this module and init Data Module by
DM := TDM.Create(nil);  in DoRun procedure.

Make PrepareReport and Export for example to PDF.

LazReport is working in console app without GUI.

tecnoxarxa

  • Newbie
  • Posts: 3
Re: SOLVED :LazReport - console application
« Reply #7 on: April 08, 2019, 02:13:15 am »
Are you talking about windows? Can you try it on Linux system without X server? It’s working too?

dsiders

  • Hero Member
  • *****
  • Posts: 1079
Re: LazReport - console application
« Reply #8 on: April 08, 2019, 08:36:28 am »
You could consider using fpReport, which is not inextricably bound to a GUI.

Why is not installed by default as lazreport?

For starters it's a FPC project and not a Lazarus one.

Lazarus still ships with FPC 3.0.4. I don't think it was ready for 3.0.4.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

cappe

  • Full Member
  • ***
  • Posts: 191
Re: SOLVED :LazReport - console application
« Reply #9 on: April 08, 2019, 04:38:34 pm »
Are you talking about windows? Can you try it on Linux system without X server? It’s working too?

This is interesting

 

TinyPortal © 2005-2018