Report with oTree

Report with oTree

Postby Silvio.Falconi » Tue Sep 17, 2013 8: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: Select all  Expand view

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: Select all  Expand view

#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 ?
Last edited by Silvio.Falconi on Tue Sep 17, 2013 11:05 am, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Report with oTree

Postby Antonio Linares » Tue Sep 17, 2013 9:32 am

Try with tabs instead of Spaces
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Report with oTree

Postby Silvio.Falconi » 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

Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Report with oTree

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Report with oTree

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Report with oTree

Postby Silvio.Falconi » Tue Sep 17, 2013 3:31 pm

because are over 1000
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 93 guests