FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Report with oTree
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Report with oTree
Posted: Tue Sep 17, 2013 08:43 AM
I have a oTree and I wish make a report style otree

when I make the report I have this printout



I tried with :

local aSpaces := { "",Space(10),Space(20),Space(30),Space(40) }
..
REPORT ::oReport

..

COLUMN TITLE "Denominazione Dewey" ;
DATA aSpaces[INT(AT(" 0",Str(FR->Frn1,2)+Str(FR->Frn2,2)+Str(FR->Frn3,2)+Str(FR->Frn4,2)+Str(FR->Frn5,2))/2)]+FR->FrTipo SIZE 200 FONT 1

but it make error
Code (fw): Select all Collapse
Application
===========

   Error description: Error BASE/1132  Bound error: array access
   Args:
     [   1] = A   { ... }
     [   2] = N   0

Stack Calls
===========
   Called from: test.prg => (b)TEST( 22 )
   Called from: .\source\classes\RCOLUMN.PRG => TRCOLUMN:NEW( 75 )
   Called from: .\source\classes\PDREPORT.PRG => RPTADDCOLUMN( 100 )
   Called from: test.prg => TEST( 22 )


this the test
Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "Report.ch"

STATIC oReport

Function Test()

  LOCAL oFont1, oFont2

    local aSpaces  := { "",Space(10),Space(20),Space(30),Space(40) }
  
   DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,-10
     DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-10 BOLD


USE FRANCESA ALIAS FR
 INDEX ON Str(FRN1,2)+Str(FRN2,2)+Str(FRN3,2)+Str(FRN4,2)+Str(FRN5,2)+FrTipo TAG FR0  TO FRANCESA
 INDEX ON UPPER(FrTipo) TAG FR1 TO FRANCESA


          REPORT oReport TITLE  "*** Report with oTree***"  ;
          FONT oFont1, oFont2 ;
          PREVIEW
          COLUMN TITLE "Denominazione Dewey" ;
                          DATA aSpaces[INT(AT(" 0",Str(FR->Frn1,2)+Str(FR->Frn2,2)+Str(FR->Frn3,2)+Str(FR->Frn4,2)+Str(FR->Frn5,2))/2)]+FR->FrTipo;
                                       SIZE 200 FONT 1
          END REPORT
     ACTIVATE REPORT oReport
     CLOSE FR
     oFont1:End()
     oFont2:End()

RETURN NIL


how I can resolve it ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Report with oTree
Posted: Tue Sep 17, 2013 09:32 AM

Try with tabs instead of Spaces

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Report with oTree
Posted: Tue Sep 17, 2013 11:03 AM
Antonio,
I resolved ...eh eh eh...there was an error on database :-)))
I found a record with 0 0 0 0 0 xxxxxxxxxxx and this make error on report tree
now run ok as you can see here

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Report with oTree
Posted: Tue Sep 17, 2013 11:05 AM

How I can make to insert images instead of the numbers ?
one image for first level
another for second level

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Report with oTree
Posted: Tue Sep 17, 2013 11:37 AM

Why don't you hardcopy to the printer the opened tree itself ? :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Report with oTree
Posted: Tue Sep 17, 2013 03:31 PM

because are over 1000

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion