Page 1 of 1
Pregunta sobre Report
Posted: Tue Feb 14, 2017 5:51 pm
by ruben Dario
Saludos a Forum
Alguien me puede decir cual es el Error, esactamente me da error de String el la linea de HEADER
Code: Select all
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" */
Re: Pregunta sobre Report
Posted: Tue Feb 14, 2017 6:03 pm
by Biel EA6DD
Parece correcto, quita el */ que tienes al final.
Re: Pregunta sobre Report
Posted: Tue Feb 14, 2017 6:08 pm
by karinha
CENTER... CENTER... dos veces.. mira el correcto:
Code: Select all
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
Re: Pregunta sobre Report
Posted: Wed Feb 15, 2017 1:51 pm
by ruben Dario
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 )
Re: Pregunta sobre Report
Posted: Wed Feb 15, 2017 2:54 pm
by karinha
Code: Select all
#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
Re: Pregunta sobre Report
Posted: Wed Feb 15, 2017 3:48 pm
by horacio
Estas incluyendo "report.ch" ?
Saludos