FoxPro/Visual FoxPro - Personalizar Reportes

 
Vista:

Personalizar Reportes

Publicado por Ivonne Y. Mul (4 intervenciones) el 17/08/2006 23:32:37
Hola amigos de la web, quien me puede decir como personalizar el formato de los reportes; si alguien sabe se lo agradeceria muchos..Gracias de antemano.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Personalizar Reportes

Publicado por jorge (423 intervenciones) el 17/08/2006 23:48:46
Hola amiga, personalizar en que sentido, formatos de texto, encabezados, configuracion de pagina,,,?????
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Personalizar Reportes

Publicado por Plinio (7841 intervenciones) el 18/08/2006 02:12:32
Puedes tener los archivos de reportes (.frx y .frt) dondel el cliente y puedes usar el modify report dentro de tu aplicacion.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Personalizar Reportes

Publicado por Ivonne (4 intervenciones) el 18/08/2006 15:20:26
Hola gracias por contestar a los 2 ,me refiero que cuando mande a la vista previa no me aparezca como lo muestra vfp en preview ,yo quiero que tenga mejor presentacion y que el icono de la impresora aparezca dentro de la barra de herramientas y no de manera flotante como aparece en el preview..nosé si me explico?.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Personalizar Reportes

Publicado por Plinio (7841 intervenciones) el 18/08/2006 15:31:49
En VFP 9 puedes facilmente cambiar el preview o si usas otra version podria hacer un formulario personalizado por ti y enviar la salida a ese formulario con la clausula IN WINDOWS del REPORT FORM.

Ver estos casos:

http://www.spacefold.com/colin/archive/articles/reportpreview/rp_extend.html
ftp://leafe.com/frx_preview.zip
ftp://leafe.com/NavPaneListener.prg
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

RE:Personalizar Reportes

Publicado por Ernesto Hernandez (4623 intervenciones) el 19/08/2006 22:21:36
Prueba esto

*------------------------------------------
* Usage as a preview container:
* _REPORTPREVIEW = "<this program>"
*
* Testing outside of the report system:
* DO <this program>
*------------------------------------------
lparameters oRef
if pcount()=0
rl = newobject("ReportListener")
rl.ListenerType = 3
report form ? object m.rl
* report form "C:\Prestamos Personales\Reports\contrato.frx";
object m.rl

x = newobject("myPreview")
x.Listener = m.rl
x.Show(1)
return
else
oRef = newobject("myPreview")
endif
return

*------------------------------------------------
#define ZOOM_SCALE 1.3

*------------------------------------------------
* The preview frame...
*------------------------------------------------
define class myFrame as Container
Width = 296
Height = 372
Left = 12
Top = 12
SpecialEffect = 1
BackColor = rgb(192,192,192)

add Object target as myTarget
enddefine

*------------------------------------------------
* ...and its child Shape:
*------------------------------------------------
define class myTarget as Shape
Height = 330
Width = 255
Left = 20
Top = 20
BackColor = rgb(255,255,255)

procedure MouseDown
lparameters nButton, nShift, nXCoord, nYCoord

offsetX = m.nXCoord - THIS.Left
offsetY = m.nYCoord - THIS.Top

THISFORM.MousePointer = 5
do while mdown()
THIS.Left = mcol(0,3) - m.offsetX
THIS.Top = mrow(0,3) - m.offsetY
enddo

THISFORM.MousePointer = 0
endproc
enddefine

*------------------------------------------------
* The form class:
*------------------------------------------------
define class myPreview as Form

Width = 420
Height = 395
BorderStyle = 1

add object frame as myFrame

add object cmdPrev as myButton ;
with Top=12, Caption = "Previa"
add object cmdNext as myButton ;
with Top=44, Caption = "Proxima"
add object cmdZoomIn as myButton ;
with Top=96, Caption = "Zoom In"
add object cmdZoomOut as myButton ;
with Top=128, Caption = "Zoom Out"
add object cmdReset as myButton ;
with Top=176, Caption = "Pagina Completa"
add object cmdClose as myButton ;
with Top=220, Caption = "Cerrar"

Listener = .null.
PageNo = 1

procedure Outputpage()
with THIS
if not isnull(.Listener) and .Listener.PageTotal > 0

.Listener.OutputPage( ;
.PageNo, .Frame.Target, 2, ;
0, 0 , 0 , 0 , ;
.Frame.Left +2, ;
.Frame.Top +2, ;
.Frame.Width -4, ;
.Frame.Height -4 )

.Caption = ;
justfname(.Listener.commandClauses.file) ;
+ " - pagina " + trans(.PageNo)
.Caption = ;
"Mi reporteador " ;
+ " - pagina " + trans(.PageNo)

endif
endwith
endproc

procedure Paint()
THIS.OutputPage()
endproc

procedure cmdPrev.Click
with THISFORM
.PageNo = max(1,.PageNo-1)
.OutputPage()
endwith
endproc

procedure cmdNext.Click
with THISFORM
.PageNo = min(.Listener.PageTotal,.PageNo+1)
.OutputPage()
endwith
endproc

procedure cmdZoomIn.Click
with THISFORM.Frame.Target
.Width = int(.Width * ZOOM_SCALE)
.Height = int(.Height * ZOOM_SCALE)
endwith
THISFORM.OutputPage()
endproc

procedure cmdZoomOut.Click
with THISFORM.Frame.Target
.Width = max(17,int(.Width / ZOOM_SCALE))
.Height = max(22,int(.Height / ZOOM_SCALE))
endwith
THISFORM.OutputPage()
endproc

procedure cmdReset.Click
with THISFORM.Frame.Target
.Top = 20
.Left = 20
.Width = 255
.Height = 330
endwith
endproc

procedure cmdClose.Click
THISFORM.Release()
endproc

*-------------------------------------------
* Methods required for operation
* as a Preview Container:
*-------------------------------------------
procedure SetReport( oRef )
if not isnull(oRef) and vartype(oRef) = "O"
THIS.Listener = m.oRef
else
THIS.Listener = .null.
THIS.Hide()
endif
endproc

procedure QueryUnload()
nodefault
THIS.Release()
endproc

procedure Release()
if not isnull(THIS.Listener)
THIS.Listener.OnPreviewClose(.F.)
THIS.Listener = .null.
endif
THIS.Hide()
endproc

procedure Destroy()
THIS.Listener = null
dodefault()
endproc

enddefine

*------------------------------------------------
* This button class is used for the form buttons:
*------------------------------------------------
define class myButton as CommandButton
FontName = "Tahoma"
FontSize = 8
Width = 84
Height = 27
Left = 320
enddefine

Suerte
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar