FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour FastReport
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
FastReport
Posted: Wed Sep 30, 2009 08:11 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 (fw): Select all Collapse
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




Posts: 230
Joined: Sat Apr 19, 2008 10:28 PM
Re: FastReport
Posted: Wed Sep 30, 2009 08:31 PM

Thanks Otto,

I am installing FastReport right now. How does it compare with EasyReport that comes with Fivewin or with Crystal Report?

How is the license? I work in 3 computers. Can I install it in more than one? Do you have to re-register everytime you format the hard drive?

Thank you,

Alvaro

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: FastReport
Posted: Wed Sep 30, 2009 08:52 PM
I would say that FastReport is more like Crystal Reports but – and this I think is the biggest advantage of FastReport – you don’t have to install anything on your clients computers. You only have to copy the FastReport.dll to your application directory.
I think you need one license per developer. But I am not sure about.

REGISTER THIS SOFTWARE LICENSE GIVES YOU THE RIGHT TO:

1. Install and use the Product for the sole purposes of designing, developing, testing, and deploying application programs which you create. You may install a copy of the Product on a computer and freely move the Product from one computer to another, provided that you are the only individual using the Product. If you are an entity, you must designate one individual within your organization ("Named User") to have the right to use the Product.


Best regards,
Otto
Posts: 230
Joined: Sat Apr 19, 2008 10:28 PM
Re: FastReport
Posted: Wed Sep 30, 2009 10:32 PM

Thank you.

Up and working in 10 minutes. Very usefull.

Alvaro

Continue the discussion