FastReport

FastReport

Postby Otto » Wed Sep 30, 2009 6:27 pm

Today I finished my first report with FASTREPORT.
I publish some screenshots for those who don’t know FastReport.

This is the code I insert in my FWH source code.

Code: Select all  Expand view  RUN


oFr := frReportManager():New()
   oFr:LoadLangRes( "German.xml" )
   oFr:SetIcon( 1 )

   oFr:SetWorkArea("NStatistik", SELECT("NStatistik"))

   oFr:SetTitle( "Nächtigungsstatistik" )
   oFr:LoadFromFile( ".\REPS\Naechtigungen.FR3" )
   oFr:AddVariable( "TITOL", "cTitol", "'FACTURA'" )
   cFirma := Setup():cCompany+"test"
   cTitle2 := "Basis:  " + GetPvProfString( "STATISTIK","AnzahlBetten", "50", ".\INI\WINHOT2.INI" )
   oFr:AddVariable( "FIRMA", "cCompany",  "'" + Setup():cCompany +"'"  )

   oFr:AddVariable( "FIRMA", "cCompany"     , "'" + setup():cCompany +"'" )
   oFr:AddVariable( "FIRMA", "cAddr1"       , "'" + setup():cAddr1   +"'" )
   oFr:AddVariable( "FIRMA", "cAddr2"       , "'" + setup():cAddr2   +"'" )
   oFr:AddVariable( "FIRMA", "cAddr3"       , "'" + setup():cAddr3   +"'" )
   oFr:AddVariable( "FIRMA", "cTelefon"     , "'" + setup():cTelefon +"'" )
   oFr:AddVariable( "FIRMA", "cFax"         , "'" + setup():cFax     +"'" )
   oFr:AddVariable( "FIRMA", "cEmail"       , "'" + setup():cEmail   +"'" )
   oFr:AddVariable( "FIRMA", "cPayPalEmail" , "'" + setup():cPayPalEmail +"'" )
   oFr:AddVariable( "FIRMA", "Basis",  "'" + cTitle2 +"'"  )
   oFr:AddVariable("Zeitraum", "VonBis", "'" + dtoc(  ::anfang  )  + "-" + dtoc(  ::ende  )  + "'")

   //oFr:AddVariable("My Lovely Vars", "test", 100.25)
   //oFr:AddVariable("My Lovely Vars", "test1", "'Test'")
   //oFr:AddVariable("My Lovely Vars", "test2", ctod("01/01/2007"))

   oFr:PreviewOptions:SetAllowEdit(.F.)

  [b] oFr:DesignReport()[/b]   oFr:ShowReport()

   //oFr:SetProperty("PDFExport", "OpenAfterExport", .t.)

   // oFr:SetProperty(cExpObj, "FileName", cExpFile)
   // oFr:DoExport("PDFExport")
   //oFr:ClearDataSets()
   // oFr:ShowReport()

   oFr:DestroyFr()

 


If you insert the line:
oFr:DesignReport()
then the screen designer opens automatically.
This is a mighty tool.
Thanks Marco for introducing FastReport to me.

BTW there is a test version. The only limitation is that you can only print reports up to 5 pages.

Best regards,
Otto


Image

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6364
Joined: Fri Oct 07, 2005 7:07 pm

Re: FastReport

Postby Otto » Wed Sep 30, 2009 6:32 pm

This screen shot shows the variables you send from your FW program to FastReport.
You can drag & drop them from here to your report page.
Best regards,
Otto

Code: Select all  Expand view  RUN

oFr:AddVariable( "FIRMA", "cCompany"     , "'" + setup():cCompany +"'" )
   oFr:AddVariable( "FIRMA", "cAddr1"       , "'" + setup():cAddr1   +"'" )
   oFr:AddVariable( "FIRMA", "cAddr2"       , "'" + setup():cAddr2   +"'" )
   oFr:AddVariable( "FIRMA", "cAddr3"       , "'" + setup():cAddr3   +"'" )
   oFr:AddVariable( "FIRMA", "cTelefon"     , "'" + setup():cTelefon +"'" )
   oFr:AddVariable( "FIRMA", "cFax"         , "'" + setup():cFax     +"'" )
   oFr:AddVariable( "FIRMA", "cEmail"       , "'" + setup():cEmail   +"'" )
   oFr:AddVariable( "FIRMA", "cPayPalEmail" , "'" + setup():cPayPalEmail +"'" )
   oFr:AddVariable( "FIRMA", "Basis",  "'" + cTitle2 +"'"  )
   oFr:AddVariable("Zeitraum", "VonBis", "'" + dtoc(  ::anfang  )  + "-" + dtoc(  ::ende  )  + "'")

 



Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6364
Joined: Fri Oct 07, 2005 7:07 pm

Re: FastReport

Postby Otto » Wed Sep 30, 2009 6:37 pm

This screen shot shows the dbf file you address from your FW program.
You can drag & drop the fields from here to your report page.
Best regards,
Otto
Code: Select all  Expand view  RUN


 oFr:SetWorkArea("NStatistik", SELECT("NStatistik"))  
 



Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6364
Joined: Fri Oct 07, 2005 7:07 pm

Re: FastReport

Postby Armando » Wed Sep 30, 2009 6:42 pm

Otto:

Thanks so much for your excelent tutor.

Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3242
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: FastReport

Postby Otto » Wed Sep 30, 2009 6:58 pm

How to get graphics and data on the same page?

The graphics and the data of this report are on 2 different pages.

On page 2 select "PrintONPreviousPage".



Image

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6364
Joined: Fri Oct 07, 2005 7:07 pm

Re: FastReport

Postby Randal » Thu Oct 01, 2009 6:22 pm

Otto,

Thanks for the sample. I downloaded the demo however I could not compile because I don't have the lang_en.ch or sayref.ch files (couldn't find them anywhere). I did review the .exe demo however I could not add fields from my own tables to the report. I guess I have to do this by selecting my tables in the .prg before opening the designer or am I missing something?

Thanks,
Randal
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Re: FastReport

Postby Otto » Thu Oct 01, 2009 6:58 pm

Randal,

I think you can command them out.
I don’t have these files, too.

>did review the .exe demo however I could not add fields from my own tables to the report. I guess I have to do this by selecting my tables in the .prg before opening the designer or am I missing something?


Yes. For example:
Code: Select all  Expand view  RUN
oFr:SetWorkArea("NStatistik", SELECT("NStatistik"))


Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6364
Joined: Fri Oct 07, 2005 7:07 pm

Re: FastReport

Postby Randal » Fri Oct 02, 2009 8:29 pm

Otto,

I guess the end user wouldn't be able to create their own reports for anything more than one table as any index orders and relationships between multiple tables have to be set before you open the designer. I think the designer would be too complicated for most end users anyway.

Thanks,
Randal
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Re: FastReport

Postby Otto » Fri Oct 02, 2009 9:15 pm

Hello Rendal,

Good to hear that FR is working on your side.
Have you had to change beside
that you command out:
lang_en.ch or sayref.ch anything else?

You are right: the designer is no end user tool.
But for you as programmer you have all possibilities and the reports look professional.

It would be good to have the designer from EasyReport for the end users and
FastReport for the power users. Maybe there is a lightweight available.

I thought it should be possible too to manipulate the FR- files which are xml files.

FastReport is capable to export to many formats also to EXCEL. So the end users could
make the changes they want in EXCEL.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6364
Joined: Fri Oct 07, 2005 7:07 pm

Re: FastReport

Postby Armando » Fri Oct 02, 2009 11:48 pm

Otto, Randal:

Otto wrote:You are right: the designer is no end user tool.
But for you as programmer you have all possibilities and the reports look professional.


Exuse me but there are an End user's manual (230 pages) and a Programer's manual (43 pages)

As you can see the end user's manual is bigest.

With best regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3242
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: FastReport

Postby HunterEC » Sat Oct 03, 2009 12:13 am

Where can I get / download FastReport ? Thank you.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: FastReport

Postby Otto » Sat Oct 03, 2009 6:20 am

Hello,

[urhttp://www.paritetsoft.ru/frh.html][/url]

Best regards,
Otto

I quote here from a post of Marco:

Hi,
I suggest you to take a look at FastReport http://www.paritetsoft.ru/frh.htm
It is easly integrable in a FWH app and supports a lot of export formats - excel, word, openoffice write, openoffice calc also.

It runs with a SINGLE self.contained dll.
I previously used - as you - different components toghether to manage the reports and provide all features to my customers (Easypreview for the preview, Amyuni for the .doc export, irfanview for some graphics formats not supported by Easypreview) but it became difficult to manage and upgrade all components (We have about 5,500 customers). Using FastReport I replaced all of this with just a dll !!

It is also a report used from a lot of delphi programmers and this is a warranty for us about the future release - see http://www.fast-report.com

Hope this can help you. However on the paritetsoft website there are a lot of FWH samples and a trial report version.
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6364
Joined: Fri Oct 07, 2005 7:07 pm

Re: FastReport

Postby Silvio » Sat Oct 03, 2009 6:45 am

Otto,

Why not post a test complete with two dbf as an Order of products ?

I saw FR , it is a good application but ...

Perhaps too heavy, because it must load the DLL before printing

We can converte also the report on rtf but the lines are not converted to good...
would be nice to use something created with fivewin and enter fully into our applications without using third parties,

I believe this is also the new policy of Fivetech, which I support because it seems more real.
for both fully supported, both for easy of use, without trying to chase the authors of classes to have upgrades or modifies.

My project to create a report designer has stopped for now,

I can not finish it alone,

I miss a few things but I do not know if I can finish it yet


At first I maintained the paper as if it were a single area,

but now I understand how to manage different areas of the document

but I still have not figured out how to put into practice what I understand

Then for drawing lines, boxes, fields, and images we have found how to draw and how to save

so I fail to create the areas but I need your help

If I found time I can continue with my work...
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: FastReport

Postby Otto » Sat Oct 03, 2009 6:39 pm

Why not post a test complete with two dbf as an Order of products ?


Hello Silvio,
Could you please explain what you exactly mean.
How should this form look - please post a screen shot .

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6364
Joined: Fri Oct 07, 2005 7:07 pm

Re: FastReport

Postby gvalentin » Sat Oct 03, 2009 8:09 pm

Kleyber Derik made a good demo of FastReport.

I don't know if it is on some site.

-----
GV
----------------
Gustavo Valentín
Softmagic SRL
Argentina
User avatar
gvalentin
 
Posts: 8
Joined: Sat Sep 05, 2009 11:30 pm
Location: Argentina

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 75 guests