ERROR ON REPORT CLASS : To Josè and to All
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
I'm trying to modify tinforme class of Josè,
viewtopic.php?f=6&t=20860&p=111880&hilit=tinforme#p111880
adding new features : It run ok but I have some problems whith these :
1) preview or print colors of titles, header, and column
2) preview or print colors of the grid
3) preview or print styles of the grid
![Image](http://img577.imageshack.us/img577/8172/jose1.jpg)
![Image](http://img218.imageshack.us/img218/5817/jose2f.jpg)
to set the color and size and stiles I use these commands
::aColors:={"CLR_BLACK","CLR_BLUE" ,"CLR_GREEN", "CLR_CYAN" , ;
"CLR_RED" ,"CLR_MAGENTA","CLR_GRAY","CLR_HBLUE", ;
"CLR_HGREEN","CLR_HCYAN","CLR_HRED" ,"CLR_HMAGENTA", ;
"CLR_YELLOW","CLR_WHITE","CLR_HGRAY"}
::aClr:={"Nero","Azurro","Verde","Cielo","Rosso","Magenta", ;
"Grigio","Azurro Intenso","Verde Intenso","Cielo Intenso", ;
"Rosso Intenso","Magenta Intenso","Amarillo","Bianco" ,"Grigio chiaro" }
::aPenSizes := { "1", "2", "3", "4", "5" }
::aPenEstilo := { "Solido", "Linea", "Punto", "Linea punto", "Linea punto punto" }
::aPenStilos:= { "PS_SOLID","PS_DASH","PS_DOT","PS_DASHDOT","PS_DASHDOTDOT"}
...
the gets ( you see on pictures)
...
::nColore := ::aColors[ VAL(ltrim(STR(AScan( ::aclr, Trim(::acColor ))))) ]
::nPensize:= ::aPenSizes[ AScan( ::aPenSizes ,::acPenSizes)]
::nPenstilo:= ::aPenStilos[ AScan(::aPenEstilo,::acPenEstilo)]
to define the colors for the Grid I use the define pen :
DEFINE PEN ::AoPen1 STYLE ::nPenstilo WIDTH val(::nPensize) COLOR ::nColore OF ::oReport
but only the size val(::nPensize) run ok I not understood why ?
for the fonts I use the same and then the commnd END REPORT I insert these lines :
END REPORT
IF ::oReport:lCreated
::oReport:SetTxtColor(::nColoreFont1,1)
::oReport:SetTxtColor(::nColoreFont2,2)
::oReport:SetTxtColor(::nColoreFont3,3)
::oReport:SetPenColor(::nColore)
endif
::nColoreFont1,::nColoreFont2,::nColoreFont3 -> CLR_XXXX
BUT IT NOT RUN
ANY IDEA ?
viewtopic.php?f=6&t=20860&p=111880&hilit=tinforme#p111880
adding new features : It run ok but I have some problems whith these :
1) preview or print colors of titles, header, and column
2) preview or print colors of the grid
3) preview or print styles of the grid
![Image](http://img577.imageshack.us/img577/8172/jose1.jpg)
![Image](http://img218.imageshack.us/img218/5817/jose2f.jpg)
to set the color and size and stiles I use these commands
::aColors:={"CLR_BLACK","CLR_BLUE" ,"CLR_GREEN", "CLR_CYAN" , ;
"CLR_RED" ,"CLR_MAGENTA","CLR_GRAY","CLR_HBLUE", ;
"CLR_HGREEN","CLR_HCYAN","CLR_HRED" ,"CLR_HMAGENTA", ;
"CLR_YELLOW","CLR_WHITE","CLR_HGRAY"}
::aClr:={"Nero","Azurro","Verde","Cielo","Rosso","Magenta", ;
"Grigio","Azurro Intenso","Verde Intenso","Cielo Intenso", ;
"Rosso Intenso","Magenta Intenso","Amarillo","Bianco" ,"Grigio chiaro" }
::aPenSizes := { "1", "2", "3", "4", "5" }
::aPenEstilo := { "Solido", "Linea", "Punto", "Linea punto", "Linea punto punto" }
::aPenStilos:= { "PS_SOLID","PS_DASH","PS_DOT","PS_DASHDOT","PS_DASHDOTDOT"}
...
the gets ( you see on pictures)
...
::nColore := ::aColors[ VAL(ltrim(STR(AScan( ::aclr, Trim(::acColor ))))) ]
::nPensize:= ::aPenSizes[ AScan( ::aPenSizes ,::acPenSizes)]
::nPenstilo:= ::aPenStilos[ AScan(::aPenEstilo,::acPenEstilo)]
to define the colors for the Grid I use the define pen :
DEFINE PEN ::AoPen1 STYLE ::nPenstilo WIDTH val(::nPensize) COLOR ::nColore OF ::oReport
but only the size val(::nPensize) run ok I not understood why ?
for the fonts I use the same and then the commnd END REPORT I insert these lines :
END REPORT
IF ::oReport:lCreated
::oReport:SetTxtColor(::nColoreFont1,1)
::oReport:SetTxtColor(::nColoreFont2,2)
::oReport:SetTxtColor(::nColoreFont3,3)
::oReport:SetPenColor(::nColore)
endif
::nColoreFont1,::nColoreFont2,::nColoreFont3 -> CLR_XXXX
BUT IT NOT RUN
ANY IDEA ?