FastReport

Re: FastReport

Postby Otto » Sat Oct 03, 2009 8:26 pm

I have the demo. But the demo-fwh.rc file is missing. Do you know where I can get the file?
Thanks in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: FastReport

Postby Silvio » Sun Oct 04, 2009 7:59 am

this is a good sample:
Image


there are some areas :

1. header
2. body
3 footer

on the footer I must insert
VAT or TAX ( in Italy IVA) for each type
sample :
20 456
19 567
17 789

on the ooter I must insert also the deadlines
sample :
30 gg rata 1 300,00
60 gg rata2 500,00
90 gg rata3 800,00



With ER this is possible but I had work for create an order many days
Best Regards, Saludos

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

Re: FastReport

Postby gvalentin » Sun Oct 04, 2009 3:33 pm

/****************************************************************************


fastdemo.rc

produced by Borland Resource Workshop


*****************************************************************************/


DEMO DIALOG 103, 23, 448, 297
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "FastReport for xHarbour+FWH - Demo "
FONT 8, "MS Sans Serif"
{
AUTORADIOBUTTON "Show report", 101, 15, 20, 70, 10, BS_AUTORADIOBUTTON | WS_GROUP
AUTORADIOBUTTON "Design report", 102, 90, 20, 70, 10, BS_AUTORADIOBUTTON | WS_GROUP
AUTORADIOBUTTON "Print report", 103, 165, 20, 70, 10, BS_AUTORADIOBUTTON | WS_GROUP
AUTORADIOBUTTON "Export report", 104, 240, 20, 56, 10, BS_AUTORADIOBUTTON | WS_GROUP
COMBOBOX 105, 334, 23, 103, 71, CBS_DROPDOWNLIST | WS_TABSTOP
PUSHBUTTON "Simple list", 501, 15, 50, 140, 15
PUSHBUTTON "Simple list with group", 502, 15, 70, 140, 15
GROUPBOX "Reports", -1, 5, 10, 300, 30, BS_GROUPBOX
PUSHBUTTON "More complex", 503, 15, 90, 140, 15
PUSHBUTTON "UserDS and Dialogs", 504, 15, 110, 140, 15
PUSHBUTTON "Work area as UserDS", 505, 15, 130, 140, 15
PUSHBUTTON "ADO and Charts", 506, 175, 50, 140, 15
PUSHBUTTON "Some Functions calls examples", 507, 175, 70, 140, 15
PUSHBUTTON "More Complex in FR only", 508, 175, 90, 140, 15
PUSHBUTTON "Memos and Pictures", 509, 175, 110, 140, 15
PUSHBUTTON "ManualBuild Report", 510, 175, 130, 140, 15
PUSHBUTTON "&X-Quit", 550, 333, 272, 104, 15
LTEXT "Select FastReport Language:", -1, 337, 11, 99, 8
GROUPBOX " Last loaded report", 106, 11, 158, 163, 99, BS_GROUPBOX
GROUPBOX " Current state: ", 107, 187, 159, 163, 99, BS_GROUPBOX
EDITTEXT 108, 45, 177, 120, 12, NOT WS_TABSTOP | NOT WS_BORDER
LTEXT "Name:", -1, 18, 178, 24, 8
LTEXT "Description:", -1, 17, 197, 41, 8
EDITTEXT 109, 17, 209, 152, 44, ES_MULTILINE | NOT WS_TABSTOP | NOT WS_BORDER
EDITTEXT 110, 199, 180, 136, 12, NOT WS_TABSTOP | NOT WS_BORDER
LTEXT "Other languages (32 languages)", -1, 335, 41, 104, 8
LTEXT "see at download area", -1, 335, 51, 104, 8
LTEXT "Spirin Sergey, © 2006-2008, All rights reserved", -1, 13, 267, 151, 8
LTEXT "Link:", -1, 13, 279, 18, 8
EDITTEXT 111, 57, 278, 104, 12, NOT WS_TABSTOP | NOT WS_BORDER
EDITTEXT 112, 199, 192, 136, 12, NOT WS_TABSTOP | NOT WS_BORDER
}


EXPORTA DIALOG 6, 18, 300, 200
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Exportação"
FONT 8, "MS Sans Serif"
{
CONTROL "", 1101, "LISTBOX", LBS_STANDARD | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 25, 205, 114
CONTROL "", 101, "EDIT", ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 10, 150, 205, 12
CONTROL "Dialog with more options", 102, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 165, 100, 10
CONTROL "Open after export", 103, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 180, 100, 10
CONTROL "&1-Export", 501, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 230, 25, 60, 20
CONTROL "&X-Cancel", 510, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 230, 55, 60, 20
CONTROL "Export to", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 10, 7, 80, 8
CONTROL "File name", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 10, 140, 60, 8
}


DEMO ICON "demo.ico"

FASTREPORT1 RCDATA "C:\Users\Kleyber\Downloads\FRH\REPS\1.fr3"
FASTREPORT2 RCDATA "C:\Users\Kleyber\Downloads\FRH\REPS\2gr.fr3"
FASTREPORT3 RCDATA "C:\Users\Kleyber\Downloads\FRH\REPS\4.fr3"
FASTREPORT4 RCDATA "C:\Users\Kleyber\Downloads\FRH\REPS\6.fr3"
FASTREPORT5 RCDATA "C:\Users\Kleyber\Downloads\FRH\REPS\7.fr3"
FASTREPORT6 RCDATA "C:\Users\Kleyber\Downloads\FRH\REPS\9.fr3"
FASTREPORT7 RCDATA "C:\Users\Kleyber\Downloads\FRH\REPS\9new.fr3"
FASTREPORT8 RCDATA "C:\Users\Kleyber\Downloads\FRH\REPS\24.fr3"
FASTREPORT9 RCDATA "C:\Users\Kleyber\Downloads\FRH\REPS\md.fr3"
----------------
Gustavo Valentín
Softmagic SRL
Argentina
User avatar
gvalentin
 
Posts: 8
Joined: Sat Sep 05, 2009 11:30 pm
Location: Argentina

Re: FastReport

Postby Otto » Sun Oct 04, 2009 7:02 pm

Hello Silvio,

here is a test sample.

Image

I would pass the address and the calculations (Total, IVA, etc. ) as variables and the Item-data as array.
So you can do all your calculations in FIVEWIN and in FastReport you only make the design.






#include "FiveWin.ch"
#include "Splitter.ch"
#include "TCBrowse.ch"
#include "FastRepH.CH"


//----------------------------------------------------------------------------//

function Main()
local oFr
local adaten := {}
local CTITLE := "Silvios Test"
local cCompany := "TestCompany 2009"
local cAddr1 := "Addr1 "
local cAddr2 := "Addr2 "
local cAddr3 := "Addr3 "
local cTelefon := "Telefon"
local cFax := "Fax "
local NCOL := 0
local X := 0


oFr := frReportManager():New()
oFr:SetIcon( 1 )


aadd(adaten,{ 684, "termosifone", 1, "N.", 65.00, 0 })
aadd(adaten,{ 685, "pasta abrasiva", 1, "N.", 99.00, 0 })
aadd(adaten,{ 7875, "Tubo", 1, "N.", 65.50, 0 })


oFr:SetUserDataSet("aDaten", "Codice;Descrizione;Qta;UM;Prezzo;Sconto", ;
{|| x := 1}, ; //--> bGoTop
{|| x := x + 1}, ; //--> bSkipPlus
{|| x := x - 1}, ; //--> bSkipMinus
{|| x > Len(aDaten)} , ; //--> bCheckEOF
{|cField|nCol := IIF( cField == "Codice", 1,;
IIF( cField == "Descrizione", 2,;
IIF( cField == "Qta", 3,;
IIF( cField == "UM", 4,;
IIF( cField == "Prezzo", 5,;
IIF( cField == "Sconto",11, 12 ))))) ), aDaten[x, nCol] } )


oFr:LoadFromFile( ".\REPS\invoice.FR3" )


oFr:SetTitle( "'" + cTITLE +"'" )

oFr:AddVariable( "TITOL", "cTitol", "'FACTURA'" )

oFr:AddVariable( "FIRMA", "cCompany" , "'" + cCompany +"'" )
oFr:AddVariable( "FIRMA", "cAddr1" , "'" + cAddr1 +"'" )
oFr:AddVariable( "FIRMA", "cAddr2" , "'" + cAddr2 +"'" )
oFr:AddVariable( "FIRMA", "cAddr3" , "'" + cAddr3 +"'" )
oFr:AddVariable( "FIRMA", "cTelefon" , "'" + cTelefon +"'" )
oFr:AddVariable( "FIRMA", "cFax" , "'" + cFax +"'" )



oFr:AddVariable("TOTAL", "Aliquota", 20)
oFr:AddVariable("TOTAL", "Imposta", 45,90)
oFr:AddVariable("TOTAL", "Imponibile", 229.50)
oFr:AddVariable("TOTAL", "Totale", 275,40)

oFr:AddVariable("TOTAL", "Scadenza", 30 )


oFr:PreviewOptions:SetAllowEdit(.F.)

oFr:DesignReport()

oFr:ShowReport()

oFr:DestroyFr()

msginfo("Ende")

return nil



Image

Image

Best regards,
Otto

Here is the download link:

http://www.atzwanger-software.com/fr/silvio.zip
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: FastReport

Postby Silvio » Sun Oct 04, 2009 7:06 pm

thanks I try it .. I have at school the versione of fr number 4
it is good on 4 version ?
Best Regards, Saludos

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

Re: FastReport

Postby Randal » Mon Oct 05, 2009 7:03 pm

Otto,

I just compiled my own program specifying the tables/indexes I wanted to use and then called the designer.

The reports do look very professional and although I haven't gotten too deep into it Fast Report looks like it has a lot of potential and I'm liking what I see. I'll report back with my experience as I get more into it.

It would be nice if there was a lightweight version available. I would really like to stick to one look and feel for the preview as opposed to use two different report generators if I can help it.

The exporting options look promising as well. For now, my primary goal is to create a report to print invoices and save each invoice in it's own pdf for emailing, same for billing statements.

I noticed in a later message you posted a sample and suggested passing all the information as variables and arrays. Do you think this is better or more effecient than using the tables directly?

Thanks,
Randal



Otto wrote: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
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Re: FastReport

Postby Otto » Mon Oct 05, 2009 7:23 pm

Code: Select all  Expand view
I noticed in a later message you posted a sample and suggested passing all the information as variables and arrays.


Randal,
Glad to hear that FastReport is working on your side.

I am not that expert on FR. I am just a starter. But I think FR can resolve many of my printing problems.

I did much work with CystalReport. I always found it easier to prepare the reports in Fivewin and only pass the data you need.
And I think with FR I will keep it like that. Otherwise you also lose the beauty of the dbase syntax. :)

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: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: FastReport

Postby alvaro533 » Mon Oct 05, 2009 8:36 pm

Hi Otto,

I just converted 3 reports from Treport to FastReport. They look very professional, and after a few hours of learning the tool, designing new reports is easy. You can also send various "pdf" files by email with only one click, if you pass to FR the email addresses , smtp server, etc... It is very convenient that FR combines a pdf creator and a bulk mail sender in the same program.
Here is the code to be able to enter the designer just holding the control key, so that it is hidden in the application.

Regards,
Alvaro

Code: Select all  Expand view


if GETKEYSTATE(VK_CONTROL)
   app():oFr:DesignReport()
elseif GETKEYSTATE(VK_SHIFT)
   app():oFr:SetProperty("PDFExport", "Author" , "Alvaro" )
   app():oFr:SetProperty("PDFExport", "FileName", "c:\borrar\prueba.pdf")
   app():oFr:SetProperty("PDFExport", "ShowDialog", .f.)
   app():oFr:SetProperty("PDFExport", "OverwritePrompt" , .T.)
   app():oFr:PrepareReport()
   app():oFr:DoExport("PDFExport")
else
   app():oFr:ShowReport()
endif

/* -------------- email
app():oFr:SetProperty("MailExport", "FileName" , "invoice_"+strzero(fac->num,5))
app():oFr:SetProperty("MailExport", "Address" , sc(cli->email,.f.) )
app():oFr:SetProperty("MailExport", "Subject" , "Factura "+strzero(fac->num,5) )
app():oFr:SetProperty("MailExport", "LogFile" , "FastReport\mail_log.txt" )
app():oFr:SetProperty("MailExport.Lines", "Text","Te adjuntamos fichero pdf con factura"+CRLF+CRLF+ ;
                                                 "Un saludo,"+CRLF+CRLF+"Alvaro",.t.)
app():oFr:SetProperty("MailExport", "ShowExportDialog" , .T. )
app():oFr:DoExport("MailExport")
*/
--------------------------
 
alvaro533
 
Posts: 206
Joined: Sat Apr 19, 2008 10:28 pm
Location: Madrid, España

Re: FastReport

Postby Otto » Tue Oct 06, 2009 12:52 pm

Hello Alvaro,
this is a good idea. I inserted it into my code.

if GETKEYSTATE(VK_CONTROL)
app():oFr:DesignReport()


FR-memo field (solved)

In the case to print a memo field one does not know in advance how much text is in it.
But you can setup like this:

- Right Click on MasterData.
- Select "Add child band".
- Set Stretched-property of ChildBand to True.
- Place Memo with a memo field to child.
- Set StrechMode of Memo to smActualHeight
- Set MINIMUM HEIGHT for memo.

if memo field can be empty then write event:

procedure Child1OnBeforePrint(Sender: TfrxComponent); begin
Child1.Visible := <table."memofield"> <> ''; end;


Image

Image

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

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 42 guests