Custom report.

Custom report.

Postby HunterEC » Thu Nov 19, 2009 10:13 am

How can I print a report in which each record has two lines and the data being printed comes from at least 4 different files. The data processing is no problem, how do I setup this report ? I've been looking through the samples folder but I can't find one. Thank you.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: Custom report.

Postby Otto » Thu Nov 19, 2009 12:46 pm

I would suggest you to try FastReport od EasyReport.

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

Re: Custom report.

Postby James Bott » Thu Nov 19, 2009 3:50 pm

Hunter,

column title "PaidDate","InvDate" data oCash:dtepaid,oCash:invdte

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Custom report.

Postby HunterEC » Thu Nov 19, 2009 4:42 pm

James, Otto:

Thank you for your help.

Otto:
Which one is more flexible (has more options) EasyReport or FastReport ?

James:

Sorry, I don't understand your answer.

Is there a "pure" FiveWin example, I mean, done with FiveWin instead of a third party reporting engine ? Basically I want to compare all options available ? Thank you all.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: Custom report.

Postby Armando » Thu Nov 19, 2009 4:43 pm

Hunter:

Here is an other free way:

Define the columns with empty data

Code: Select all  Expand view

COLUMN TITLE "Oprcn" DATA "" SIZE  5 RIGHT
COLUMN TITLE "Tipo"   DATA "" SIZE  4 LEFT
 


Then use the ON CHANGE method to define a function.

Code: Select all  Expand view

ACTIVATE REPORT oReport;
   ON CHANGE DrawDet(oReport)
 


And in the DrawDet function you can do whatever you need.

Code: Select all  Expand view

STATIC PROCEDURE DrawDet(oReport)
oReport:SAY( 1,(cHdrOpe)->HDR_OPE,,RPT_RIGHT)
IF ! EMPTY((cHdrOpe)->HDR_CLI)
   oReport:SAY( 2,LEFT((cCliente)->CLI_NOM,45),,RPT_LEFT)
ELSE
   oReport:SAY( 2,"VENTAS MOSTRADOR",,RPT_LEFT)
ENDIF
RETURN(.T.)
 


I hope these can help you.

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: 3085
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: Custom report.

Postby HunterEC » Thu Nov 19, 2009 5:11 pm

Thank you Armando.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: Custom report.

Postby James Bott » Thu Nov 19, 2009 5:23 pm

Hunter,

Code: Select all  Expand view
column title "PaidDate","InvDate" data oCash:dtepaid,oCash:invdte


The above is pure FWH using TReport. There are two lines in the column and two fields from the same database object are being displayed. You can display items from different databases if you wish, or calculated data, or whatever.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Custom report.

Postby Otto » Thu Nov 19, 2009 6:10 pm

Hello Hunter,

EasyReport is a good tool written in FiveWin. You have access to the source. The ReportDesigner is easy to use.
I use EasyReport very much.

Since a couple of month I also have FastReport. FastReport is as mighty as Crystal Reports. The integration is very easy and you don’t have to install anything on the client PC.
This is so far the most complex report I made with FR.
Image

For lists I use Fivewin’s oReport class:
Code: Select all  Expand view


function test ()
   local nrgNr         := tagdbf->rgnr
   local oReport,oFont1,oFont2,oFont3,oPen1,oline, cTITLE:="Kopie Kassaquittung "+str(nRgNr)
   *--------------------------------------------

   DEFINE PEN oPen1 WIDTH 0.5

   DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,-10
   DEFINE FONT oFont3 NAME "ARIAL" SIZE 0,-16 BOLD
   DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-10 BOLD
   select tagdbf
   go top

   REPORT oReport TITLE " ",cTITLE," "  LEFT ;
         FONT   oFont1,;
         oFont2,;
         oFont3 ;
         PEN oPen1;
         HEADER Setup():LizenzNehmer()," ", ALLTRIM("Erstellt: " + dtoc(date())+ " - "+time()) RIGHT;
         FOOTER "Seite " + Str(oReport:nPage,3) RIGHT PREVIEW

      COLUMN TITLE "DATUM"        DATA    tagdbf->datum            SIZE 9
      COLUMN TITLE "Bondatum"     DATA    tagdbf->bondatum         SIZE 9
      COLUMN TITLE "Zeit"         DATA    tagdbf->zeit             SIZE 5
      COLUMN TITLE "Bezeichnung"  DATA    tagdbf->Bezeichnun       SIZE 20
      COLUMN TITLE "Menge"        DATA    tagdbf->Menge            SIZE 6  PICTURE "99,999.99"
      COLUMN TITLE "Wert"         DATA    tagdbf->Wert      TOTAL  SIZE 8  PICTURE "99,999,999.99"
        COLUMN TITLE "Name" , "Header2", "Header3"             DATA    (tagdbf->PLANNAME)+" "+tagdbf->gastnr,;
               "TestText:",;
               (left(tagdbf->standard,50)),;
               (left(tagdbf->preis,50)),;
               (left(tagdbf->leistung,50)) SIZE 35

   END REPORT
   oReport:CellView()

   oLine:= oReport:oTitle
   oLine:aFont[2] := {|| 3}

   ACTIVATE REPORT oReport FOR nrgNr = tagdbf->rgnr
   oPen1:End()
   oFont1:End()
   oFont2:End()
   oFont3:End()

   msginfo("Kopie Kassaquittung")

return nil

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

Re: Custom report.

Postby HunterEC » Thu Nov 19, 2009 7:11 pm

Otto:

Thank you very much for your help, very much appreciated ! :D

The pure FiveWin option is very straightforward. Can you tell me how I define a two line per record report ? Thank you.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: Custom report.

Postby Otto » Thu Nov 19, 2009 8:34 pm

Hello Hunter,
If I understand your question right:
This should give
3 headers and 6 lines - You can also insert a textline "TestText" if you want.

Best regards,
Otto


Code: Select all  Expand view
 COLUMN TITLE "Name" , "Header2", "Header3"             DATA    (tagdbf->PLANNAME)+" "+tagdbf->gastnr,;
               "TestText:",;
               (left(tagdbf->standard,50)),;
               (left(tagdbf->preis,50)),;
               (left(tagdbf->leistung,50)) SIZE 35
 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6107
Joined: Fri Oct 07, 2005 7:07 pm

Re: Custom report.

Postby HunterEC » Sat Nov 21, 2009 3:48 am

Otto:

Thank you very much ! I'll move on with your help. :D
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: Custom report.

Postby mgsoft » Mon Nov 23, 2009 8:58 am

Alfredo has shared an interactive report generator:

http://www.despachoarteaga.com.mx/Visor.zip


it may help
Saludos,

Eduardo
User avatar
mgsoft
 
Posts: 422
Joined: Mon Aug 17, 2009 12:18 pm
Location: España

Re: Custom report.

Postby hag » Mon Nov 23, 2009 11:56 pm

Where do you get a copy of easy report?
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Custom report.

Postby Armando » Tue Nov 24, 2009 12:38 am

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: 3085
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: Custom report.

Postby hag » Tue Nov 24, 2009 5:05 am

thanks
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Next

Return to FiveWin for Harbour/xHarbour

Who is online

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