FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Pregunta sobre Report
Posts: 1078
Joined: Thu Sep 27, 2007 03:47 PM
Pregunta sobre Report
Posted: Tue Feb 14, 2017 05:51 PM
Saludos a Forum

Alguien me puede decir cual es el Error, esactamente me da error de String el la linea de HEADER

Code (fw): Select all Collapse
 REPORT oRep TITLE "Reporte de Rubros"  ;
       HEADER "REPORTE" CENTER ;
       FOOTER "Hoja:" + STR(oRep:npage,3) ,"Fecha:"+DTOC(DATE()) CENTER;
      FONT oFont1 ;
       PREVIEW CAPTION  "Reporte de Rubros"     */
Ruben Dario Gonzalez
Cali-Colombia
rubendariogd@hotmail.com - rubendariogd@gmail.com
Posts: 682
Joined: Tue Feb 14, 2006 09:48 AM
Re: Pregunta sobre Report
Posted: Tue Feb 14, 2017 06:03 PM

Parece correcto, quita el */ que tienes al final.

Saludos desde Mallorca
Biel Maimó
http://bielsys.blogspot.com/
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Pregunta sobre Report
Posted: Tue Feb 14, 2017 06:08 PM
CENTER... CENTER... dos veces.. mira el correcto:

Code (fw): Select all Collapse
   REPORT oRep TITLE "Reporte de Rubros"        ;
      CAPTION  "Reporte de Rubros"              ;
      HEADER "REPORTE",                         ;
      "Fecha: "+ DTOC( DATE() ),                ;
      "Hoja: " + STR( oRep:npage, 3 )           ;
      FOOTER "- Reporte de Rubros -" CENTER     ;
      FONT oFont1                               ;
      PREVIEW





João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 1078
Joined: Thu Sep 27, 2007 03:47 PM
Re: Pregunta sobre Report
Posted: Wed Feb 15, 2017 01:51 PM

Gracias Karina, uso tu codigo que me colocastes y me genera error, a ti te funciona asi.

Funciona pero si quito esta linea
HEADER "REPORTE", ;
"Fecha: "+ DTOC( DATE() ), ;
"Hoja: " + STR( oRep:npage, 3 )

Ruben Dario Gonzalez
Cali-Colombia
rubendariogd@hotmail.com - rubendariogd@gmail.com
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Pregunta sobre Report
Posted: Wed Feb 15, 2017 02:54 PM
Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "report.ch"

STATIC oReport

Function Rep13()

     LOCAL oFont1, oFont2, oFont3

     DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,-10
     DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-10 BOLD
     DEFINE FONT oFont3 NAME "ARIAL" SIZE 0,-20 BOLD

     USE TEST NEW // VIA "DBFCDX"

   REPORT oReport TITLE "Reporte de Rubros"     ;
      CAPTION "Reporte de Rubros"               ;
      HEADER "Reporte de Rubros",               ;
      "Fecha:   " + DTOC( DATE() ),             ;
      "Hoja " + STR( oReport:nPage, 3 )         ;
      FOOTER "- Reporte de Rubros -" CENTER     ;
      FONT oFont1, oFont2, oFont3               ;
      PREVIEW


     COLUMN TITLE "St"         DATA Test->State

     COLUMN TITLE "First Name", "Last Name" ;
            DATA  Test->First, Test->Last

     COLUMN TITLE "Street", "City"  ;
            DATA  Test->Street, Test->City

     COLUMN TITLE "   Salary"  ;
            DATA  Test->Salary ;
            TOTAL              ;
            RIGHT              ;
            PICTURE "9,999,999";
            FONT 2             ;
            SIZE 9

     GROUP ON Test->State ;
           FOOTER "Total State "+oReport:aGroups[1]:cValue+ ;
                  " ("+ltrim(str(oReport:aGroups[1]:nCounter))+")" ;
           FONT 2


     END REPORT


     /*
     First title line with font 3 (20 bold)
     */

     oReport:oTitle:aFont[1]:= {|| 3 }


     /*
     Use second font for the data when the salary is greater than
     100.000.
     Remember that when you create the column, his title, his data
     and his total have the same font, but you can change it.
     */

     oReport:aColumns[4]:bDataFont := {|| iif(Test->Salary>100000,2 ,1 ) }

     /*
     Comments in Spanish
     */

     ACTIVATE REPORT oReport ON STARTGROUP oReport:NewLine()

     CLOSE TEST

     oFont1:End()
     oFont2:End()
     oFont3:End()

RETURN NIL


João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 1364
Joined: Wed Jun 21, 2006 12:39 AM
Re: Pregunta sobre Report
Posted: Wed Feb 15, 2017 03:48 PM

Estas incluyendo "report.ch" ?

Saludos

Continue the discussion